Chapter 18:Parallel Databases Introduction /O Parallelism Interquery Parallelism Intraquery Parallelism Intraoperation Parallelism Interoperation Parallelism Design of Parallel Systems Database System Concepts-6th Edition 18.2 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 18.2 ©Silberschatz, Korth and Sudarshan th Edition Chapter 18: Parallel Databases Introduction I/O Parallelism Interquery Parallelism Intraquery Parallelism Intraoperation Parallelism Interoperation Parallelism Design of Parallel Systems
Introduction Parallel machines are becoming quite common and affordable Prices of microprocessors,memory and disks have dropped sharply Recent desktop computers feature multiple processors and this trend is projected to accelerate Databases are growing increasingly large large volumes of transaction data are collected and stored for later analysis. multimedia objects like images are increasingly stored in databases Large-scale parallel database systems increasingly used for: storing large volumes of data processing time-consuming decision-support queries providing high throughput for transaction processing Database System Concepts-6th Edition 18.3 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 6 18.3 ©Silberschatz, Korth and Sudarshan th Edition Introduction Parallel machines are becoming quite common and affordable Prices of microprocessors, memory and disks have dropped sharply Recent desktop computers feature multiple processors and this trend is projected to accelerate Databases are growing increasingly large large volumes of transaction data are collected and stored for later analysis. multimedia objects like images are increasingly stored in databases Large-scale parallel database systems increasingly used for: storing large volumes of data processing time-consuming decision-support queries providing high throughput for transaction processing
Parallelism in Databases Data can be partitioned across multiple disks for parallel 1/O Individual relational operations (e.g.,sort,join,aggregation)can be executed in parallel data can be partitioned and each processor can work independently on its own partition. Queries are expressed in high level language(SQL,translated to relational algebra) makes parallelization easier. Different queries can be run in parallel with each other. Concurrency control takes care of conflicts. Thus,databases naturally lend themselves to parallelism. Database System Concepts-6th Edition 18.4 ©Silberschat乜,Korth and Sudarshan
Database System Concepts - 6 18.4 ©Silberschatz, Korth and Sudarshan th Edition Parallelism in Databases Data can be partitioned across multiple disks for parallel I/O. Individual relational operations (e.g., sort, join, aggregation) can be executed in parallel data can be partitioned and each processor can work independently on its own partition. Queries are expressed in high level language (SQL, translated to relational algebra) makes parallelization easier. Different queries can be run in parallel with each other. Concurrency control takes care of conflicts. Thus, databases naturally lend themselves to parallelism
I/O Parallelism Reduce the time required to retrieve relations from disk by partitioning The relations on multiple disks. Horizontal partitioning-tuples of a relation are divided among many disks such that each tuple resides on one disk. Partitioning techniques(number of disks =n): Round-robin: Send the /th tuple inserted in the relation to disk i mod n. Hash partitioning: Choose one or more attributes as the partitioning attributes. Choose hash function h with range 0...n-1 Let i denote result of hash function h applied tothe partitioning attribute value of a tuple.Send tuple to disk i. Database System Concepts-6th Edition 18.5 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 18.5 ©Silberschatz, Korth and Sudarshan th Edition I/O Parallelism Reduce the time required to retrieve relations from disk by partitioning The relations on multiple disks. Horizontal partitioning – tuples of a relation are divided among many disks such that each tuple resides on one disk. Partitioning techniques (number of disks = n): Round-robin: Send the I th tuple inserted in the relation to disk i mod n. Hash partitioning: Choose one or more attributes as the partitioning attributes. Choose hash function h with range 0…n - 1 Let i denote result of hash function h applied tothe partitioning attribute value of a tuple. Send tuple to disk i
I/O Parallelism (Cont.) Partitioning techniques(cont.) Range partitioning: Choose an attribute as the partitioning attribute. A partitioning vector [vo,v1,...vn-2]is chosen. Let v be the partitioning attribute value of a tuple.Tuples such that vi<v+1 go to disk/+1.Tuples with v<vo go to disk 0 and tuples with v>Vn-2 go to disk n-1. E.g.,with a partitioning vector [5,11],a tuple with partitioning attribute value of 2 will go to disk 0,a tuple with value 8 will go to disk 1,while a tuple with value 20 will go to disk2 Database System Concepts-6th Edition 18.6 @Silberschatz,Korth and Sudarshan
Database System Concepts - 6 18.6 ©Silberschatz, Korth and Sudarshan th Edition I/O Parallelism (Cont.) Partitioning techniques (cont.): Range partitioning: Choose an attribute as the partitioning attribute. A partitioning vector [vo , v1 , ..., vn-2 ] is chosen. Let v be the partitioning attribute value of a tuple. Tuples such that vi vi+1 go to disk I + 1. Tuples with v < v0 go to disk 0 and tuples with v vn-2 go to disk n-1. E.g., with a partitioning vector [5,11], a tuple with partitioning attribute value of 2 will go to disk 0, a tuple with value 8 will go to disk 1, while a tuple with value 20 will go to disk2