Types of Data Fragmentation Vertical Fragmentation Projection on relation(subset of attributes Reconstruction by join Updates require no tuple migration Horizontal fragmentation Selection on relation(subset of tuples Reconstruction by union pdates may require tuple migration Mixed Fragmentation A fragment is a select-Project query on relation
16 Types of Data Fragmentation Vertical Fragmentation • Projection on relation (subset of attributes) • Reconstruction by join • Updates require no tuple migration Horizontal Fragmentation • Selection on relation (subset of tuples) • Reconstruction by union • Updates may require tuple migration Mixed Fragmentation • A fragment is a Select-Project query on relation
Horizontal Fragmentation(水平划分) Partitioning the tuples of a global relation into subsets Example Supplier(SNum, Name, City) Horizontal fragmentation can be Supplier=O City ="HK" Supplier Supplier2-O City I="HK" Supplier Reconstruction is possible Supplier= Supplier, U Supplier The set of predicates defining all the fragments must be complete, and mutually exclusive
17 Horizontal Fragmentation (水平划分) Partitioning the tuples of a global relation into subsets Example: Supplier (SNum, Name, City) Horizontal Fragmentation can be: Supplier 1 = City = ``HK'' Supplier Supplier2 = City != “HK” Supplier Reconstruction is possible: Supplier = Supplier1 Supplier2 The set of predicates defining all the fragments must be complete, and mutually exclusive
Derived horizontal Fragmentation The horizontal fragmentation is derived from the horizontal fragmentation of another relation Example Supply (sNum, PNum, DeptNum, Quan) 以 is the SNum is a supplier number semIjoin Supply= Supply k SNum=SNum Supplier, operation Supply2= Supply k SNum=SNum Supplier2 The predicates defining derived horizontal fragments are (Supply. SNum=Supplier SNum)and (Supplier. City=HK") (Supply SNum= Supplier. SNum)and (Supplier City I= HK") 18
18 Derived Horizontal Fragmentation The horizontal fragmentation is derived from the horizontal fragmentation of another relation Example: Supply (SNum, PNum, DeptNum, Quan) SNum is a supplier number Supply1 = Supply SNum=SNum Supplier1 Supply2 = Supply SNum=SNum Supplier2 The predicates defining derived horizontal fragments are: (Supply.SNum = Supplier.SNum) and (Supplier. City = ``HK'') (Supply.SNum = Supplier.SNum) and (Supplier. City != ``HK'') is the semijoin operation
ertical Fragmentation(垂直划分) The vertical fragmentation of a global relation is the subdivision of its attributes into groups; fragments are obtained by projecting the global relation over each group Example EMP(ENum, Name, Sal, Tax, MNum, DNum) A vertical fragmentation can be EMP,= I ENum Name. MNum DNum EMP EMP2=II ENum, Sal. tax EMP Reconstruction EMP=EMPI EMP ENum ENum 19
19 Vertical Fragmentation (垂直划分) The vertical fragmentation of a global relation is the subdivision of its attributes into groups; fragments are obtained by projecting the global relation over each group Example EMP (ENum,Name,Sal,Tax,MNum,DNum) A vertical fragmentation can be EMP1 = ENum, Name, MNum, DNum EMP EMP2 = ENum, Sal, Tax EMP Reconstruction: ENum = ENum EMP = EMP1 EMP2