17706_levels of Distribution Transperency

15
LEVELS OF DISTRIBUTION TRANSPERENCY Structure 4.0 Objectives 4.1 Introduction 4.2 Reference Architecture for distributed databases 4.3 Types of data fragmentation 4.3.1 Horizontal Fragmentation 4.3.2 Derived Horizontal Fragmentation 4.3.3 Vertical Fragmentation 4.3.4 Mixed Fragmentation 4.4 Integrity Constraints in Distributed Databases 4.5 Summary 4.0 Objectives: In this unit we will learn the following topics: Reference Architecture for Distributed Databases Types of Data Fragmentation Integrity constraints in Distributed databases 4.1 Introduction: In this unit we suggest reference architecture for the distributed database. This architecture allows us to determine the different levels of transparency, which are conceptually relevant to understand distributed databases. Also the mapping between the different levels is defined. Here we have used the relational model and relational algebra for this purpose. The distributed access primitives are represented using the SQL

description

levels of Distribution Transperency

Transcript of 17706_levels of Distribution Transperency

LEVELS OF DISTRIBUTION TRANSPERENCYStructure4.0 Objectives4. I!tr"#ucti"!4.$ Re%ere!ce Arc&itecture %"r #istribute# #'t'b'ses4.( T)*es "% #'t' %r'+,e!t'ti"!4.(. -"ri."!t'/ Fr'+,e!t'ti"!4.(.$ Derive# -"ri."!t'/ Fr'+,e!t'ti"!4.(.( Vertic'/ Fr'+,e!t'ti"!4.(.4 0i1e# Fr'+,e!t'ti"!4.4 I!te+rit) C"!str'i!ts i! Distribute# D't'b'ses4.2 Su,,'r) 4.0 Objectives3 In this unit we will learn the following topics: Reference Architecture for Distributed Databases Types of Data Fragmentation Integrity constraints in Distributed databases4. I!tr"#ucti"!: Inthis unit we suggest reference architecture for the distributed database. Thisarchitectureallowsustodeterminethedifferent levelsoftransparency, whichareconceptually relevant to understand distributed databases. Also the mapping betweenthe different levels is defined. Here we have used the relational model and relationalalgebra for this purpose. The distributed access primitives are represented using theSQ statements, as it is user friendly. The emphasis is given to the fact that how theSQprimitives referencetheob!ects whichconstitutethedatabase. Thedifferenttypesoffragmentationmethodsarediscussed.Alsotheintegrityconstraintsinthedistributed transaction are e"plained.4.$ Re%ere!ce Arc&itecture %"r Distribute# D't'b'ses3Here we have suggested reference architecture for the distributed databases as shownin the fig.#.$.The different levels are conceptually helpful to understand thefunctioning of the whole system. The various stages of the architecture are as follows. 4/"b'/ Sc&e,'3defines all the data, which are contained in thedistributed database as if it is a centrali%ed system.Here a set of globalrelations is used. Fr'+,e!t'ti"!Sc&e,'3&achglobal relationissplit intoseveral non'overlapping portions that are called as Fr'+,e!ts. The mapping betweenthe global relations and fragments is defined in the (ragmentation Schema.It is a one to many relation such that several fragments correspond to oneglobal relation but only one global relation corresponds to one fragment.They are indicated as )i, the ith fragment of the global relation ). A//"c'ti"! Sc&e,'3The fragments are really the logical portions of theglobal relation, whicharephysicallydispersedat different sites of thenetwor*. This schema defines at which site+s, a fragment is allocated. It isto be noted that depending upon the re-uirement more than one fragmentmay be allocated at a site. So this mapping determines whether the systemis a )edundant s)ste, "r ' N"! re#u!#'!t s)ste,. L"c'/ 0'**i!+Sc&e,'3.ehavealreadydescribedtherelationshipsbetween the ob!ects at the three top levels of this architecture. These threelevels aresiteindependent/ therefore, theydonot dependonthedatamodel of the local 012Ss. At a lower level, it is necessary to map thephysical images to the ob!ects that are manipulated by the local 012Ss.This mapping is called a /"c'/ ,'**i!+ sc&e,' and depends on the typeoflocal 012S/ thereforeinaheterogeneoussystemwehavedifferenttypes of local mappings at different sites.3lobalSchema(ragmentationSchemaSite IndependentSchemasThisarchitectureprovidesaverygeneral conceptual framewor*forunderstandingdistributed databases. The three most important ob!ectives that motivate the featuresof this architecture are the separation of data fragmentation and allocation, the controlof redundancy, and the independence from local 012Ss. Se*'r'ti!+ t&e c"!ce*t "% #'t' %r'+,e!t'ti"! %r", t&e c"!ce*t "% #'t''//"c'ti"!3 This separation allows us to distinguish two different levels ofdistribution transparency, namely%r'+,e!t'ti"! tr'!s*'re!c)and/"c'ti"! tr'!s*'re!c). (ragmentation transparency is the highest degreeof transparency and consists of the fact that the user or applicationAllocationSchemaocal2appingSchema $ocal2appingSchema 4012S ofSite $012S ofSite 4ocaldatabaseat site 1ocaldatabaseat site 2(Other sites)....Fi+. 4. A reference architecture for distributed databasesprogrammer wor*s on global relations. ocation transparency is a lowerdegree of transparency and re-uires the user or application programmer towor* on fragments instead of global relations/ however, he or she does not*now where the fragments are located. E1*/icit c"!tr"/ "% re#u!#'!c):The reference architecture providese"plicit control of redundancy at the fragment level. I!#e*e!#e!ce%r",/"c'/ DB0Ss: Thisfeature, called/"c'/ ,'**i!+tr'!s*'re!c), allows us to study several problems of distributed databasemanagement without having to ta*e into account the specific data modelsof local 012Ss. Another type of transparency, which is strictly related tolocation transparency, isre*/ic'ti"! tr'!s*'re!c).)eplicationtransparency means that the user is unaware of the replication offragments.4.( T)*es O% D't' Fr'+,e!t'ti"!3 T5" #i%%ere!t t)*es %r'+,e!t'ti"!: Hori%ontal and 5ertical fragmentation candecompose the global relations into fragments. .e will first consider these two typesof fragmentation separately and then consider the more comple" fragmentation, whichcan be obtained by applying a composition of both.In all types of fragmentation, a fragment can be defined by an e"pression in arelational language+wewill userelational algebra,, whichta*esglobal relationasoperands andproduces thefragment as result. (or e"ample, if aglobal relationcontains data about employees, a fragment which contains only data about employeeswho wor* at department D$ can be obviously defined by a selection operation on theglobal relation.S",e ru/es6 5&ic& ,ust be %"//"5e# 5&e! #e%i!i!+ %r'+,e!ts3 Completeness condition:All the data of the global relation must bemapped into the fragments/ i.e., it must not happen that a data item thatbelongs to a global relation does not belong to any fragment. Reconstruction condition:It must always be possible to reconstruct eachglobal relation fromits fragments. The necessityof this condition isobvious in fact, only fragments are stored in the distributed database, andglobal relationhavetobebuilt throughthisreconstructionoperationifnecessary. Disjoint condition: It is convenient that fragments be dis!oint, so that thereplication of data can be controlled e"plicitly at the allocation level.4.(. -"ri."!t'/ Fr'+,e!t'ti"!3Hori%ontal fragmentation consists of partitioningthe tuples of a global relation intosubsets/ this is clearlyuseful indistributeddatabases, where each subset can contain data that have common geographicalproperties. It can be defined by e"pressing each fragment as a selection operation onthe global relation. E1',*/e3 let a global relation be SUPPI!R "S#U$% #A$!% &IT'(Then the hori%ontal fragmentation can be defined in the following way:SUPPI!R$ 6 SL&IT' )*$ysore* SUPPLIERSUPPI!R+ 6 SL&IT' )*Shimoga* SUPPLIER7ow let us verify whether this fragmentation fulfills the conditions stated earlier.T&ec",*/ete!ess c"!#iti"!3If 82ysore9 and8Shimoga9aretheonlypossiblevalues of the &IT' attribute, then it satisfies this condition.T&e rec"!structi"! c"!#iti"!3 can be verified easily, because it is always possible toreconstruct the SUPPI!R global relation through the following operation.SUPPLIERSUPPLIER$ UN SUPPI!R4The #isj"i!t !ess c"!#iti"! is clearly verified.7u'/i%ic'ti"!: The predicate, which is used in the selection operation and defines afragment, is called asQualification. (or instance, in the above e"ample the-ualifications -$ : &IT'6 82ysore9 -4 : &IT'6 8Shimoga9.e can generali%e from the above e"ample that in order to satisfy the completenesscondition,the set of -ualifications of all fragments must be complete,at least withrespect to the set of allowed values. The reconstruction condition is always satisfiedthrough the union operation, and the dis!oint ness condition re-uires that-ualifications be mutually e"clusive.4.(.$ Derive# -"ri."!t'/ Fr'+,e!t'ti"!3 This is a type of fragmentation, which isderived from the hori%ontal fragmentation of another relation. E1',*/e: :onsider a global relationSUPP' "S#U$% P#U$% D!PT#U$% ,UA#(whereS#U$ is a supplier number. If it is re-uired that a fragment has to contain thetuples for suppliers, which are in a given city, and then we have to go for derivedfragmentation. A semi'!oin operation with the fragments S;