You are on page 1of 36

UNIT-3 PART-A 1.Define OODM?

OODM- Object Oriented Data Model A (Logical)data Model that captures the semantics of objects supported in objectoriented programming. . Define OOD!? OOD!-Object Oriented Database A persistent and sharable collection of objects defined b" an OODM #. Define OODM$? OOD!M$- Object Oriented Database Management $"stem OOD!M$-%he Manager of OOD!.OO refers to abstract D! plus &nheritence ' object identif".&t is the (ombination OO capabilit" and D! capabilit". ) . *hat are the t"pes of O&D? %he" are t"pes of O&D Logical O&D +h"sical O&D ,. Define pointer s-i..ling or object faulting? %o achie/e the re0uired performance1 the OO!M$ must be able to con/ert O&D to and from in memor" pointer. %his con/ersion techni0ue is 2no-n pointer or object faulting. 3. *hat is the aim of pointer s-i..ling ? %he aim of pointer s-i..ling is to optimi.e access to objects. As -e ha/e just mentioned1 reference bet-een objects are normall" represented using O&Ds. 4. List the classification of pointer s-i..ling ? (lassification or techni0ue for pointer s-i..ling5 (op" /s in place s-i..ling 6ager /s la." s-i..ling Direct /s indirect s-i..ling 7. Define persistent object ? %he object that e8ist e/en after the session is o/er is called +ersistent object. %here is t"pes of objects +ersistent %ransient

9. Define transient object ? %he %ransient object is defined as Lact onl" for the in/ocation of program. %he Object :s memor" is allocated and Deallocated b" the programming language :s at the run -time s"stem. 1;. List the scheme for implementing persistence -ithin OOD!M$? +ersistent scheme %here are #schemes for implementing persistence in OOD!M$ (hec2 pointing $eriali.ation 68plicit paging 11. List the t-o methods for creating or updating persistent objects using e8plicit paging? <eachabilit" based method Allocation based method 1 . *hat are the fundamental principles of orthogonal persistence ? &t is based on # fundamental principles +ersistence independence Data t"pe orthoganalit" %ransiti/e persistence 1#. Define nested transaction model ? A transaction is /ie-s as a collection of related subtransaction each of -hich ma" also containan" number of subtransaction. 1). Define sagas ? A se0uence of flat transaction that can be interlea/ed -ith other transaction. $agas is based on the use of (ompensati/e transaction. D!M$ guarantees that either all the transaction in a $agas are $ucessfull" completed or compensati/e %ransaction are run to reco/er from partial e8ection. 1,. =o- the (oncurrenc" (ontrol is implemented in OOD!M$? (oncurrenc" control protocol is used in Multi/ersion control protocol. =ence1b" using this the concurrenc" is implemented. 13.List the basic architecture for client ser/er D!M$? # basic architecture for client ser/er D!M$ is Object $er/er +age $er/er Database $er/er 14. Define +O$%><6$? +O$%><6$ is the reaserch s"stem designers of &?><6$ that attempts to e8tend the relational mode -ith abstract datat"pe procedure and rules.

17.*hat is a >6M$%O?6? >emstone is a product -hich e8tend an e8isting object-oriented programming language -ith database capabilit". &t e8tend # Languague such as $malltal21 (@@ or Aa/a. 19.*hat is OBL? OBL CObject Buer" Languague An OBL is a function that deli/ers an object -hose t"pe ma" be infrrred from the operator contributing to the 0uer" e8pression.OBL is Dsed for both associati/e and na/igational access. ;. Ad/antage and Disad/antage of OOD!M$? Ad/5 6nriched modeling capabilities 68tensibilit" <emo/al of impedance mismatch.&mpro/ed performance Disad/5 Lac2 of Dni/ersal Data model Lac2 of 68perience Lac2 of standards (omple8it" 1. *hat are the phases of t-o phase loc2ing protocol. a) >ro-ing phase - A transaction ma" obtain loc2s1 but ma" not release an" loc2. b) $hrin2ing phase - A transaction ma" release loc2s1 but ma" not obtain an" ne- loc2s. . *hat is a loc2 point? %he point in the schedule -here the transaction has obtained its final loc2 (the end of its gro-ing phase) is called the loc2 point. #. *hat are the fields that a update log record contain? %ransaction identifier1 Data-item identifier1 Old /alue1 ?e- /alue ). *rite the se0uence of actions -hen a chec2point record is added? 1. Output on to stable storage all log records currentl" residing in main memor". . Output to the dis2 all modified buffer bloc2s. #. Output onto stable storage a log record Echec2 pointF.13. *hat is L$?? 6ach log record in A<&6$ has a log se0uence number (L$?) that uni0uel" &dentifies the record. ,. *hat happen -hen the anal"sis pass of the A<&6$ reco/er" algorithm? %his pass determines -hich transactions to undo1 -hich pages -ere dirt" at the time of crash1 and the L$? from -hich the redo pass should start.

3. *hat is a loc2 table? %he loc2 manager uses this data structureG for each data item that is currentl" loc2ed1 it maintains a lin2ed list of records1 one for each re0uest1 in the order in -hich the re0uests arri/ed. &t uses a hash table1 inde8ed on the name of a data item1 to find the lin2ed list (if an") for a data item1 this table is called loc2 table. 4. Define deadloc2 A s"stem is in a deadloc2 state if there e8ists a set of transactions such that e/er" transaction in the set is -aiting for another transaction in the set.

7. *hat are the different parallel database architectures? a) shared memor" b) shared dis2 c) shared nothing d) =ierarchical 9. *hat is a local transaction? A local transaction is one that access data onl" form sites -here the transaction -as initiated. #;. *hat is a global transaction? A global transaction is one that either accesses data in a site different from the one at -hich the transaction -as initiated1 or accesses data in se/eral different sites. #1. *hat are the different forms of data transparenc"? a) Hragmentation transparenc" b) <eplication transparenc".c) Location transparenc". # . &n distributed transactions1 name the basic s"stem failure t"pes. a) Hailure of a site b) Loss of messages c) Hailure of a communication lin2 d) ?et-or2 partition. ##. *hat is the difference bet-een homogeneous and heterogeneous distributed databases? &n a homogeneous distributed databases1 all sites ha/e identical database management s"stem soft-are. &n a heterogeneous distributed database1 different sites ma" use different schemas1 and different database management s"stem soft-are. #). *hat is data transparenc"? %he user of a distributed database s"stem should not be re0uired to 2no- either -here the data are ph"sicall" located or ho- the data can be accessed at the specific local site. %his characteristic called data transparenc".

#,. *hat are global transactions? %he global transactions are those that access and update data in se/eral local databases. #3. *hat is the function of transaction manager? %he transaction manager manages the e8ecution of those transactions (or sub transactions) that access data stored in a local site. #4. *hat is the function of transaction coordinator? %he transaction coordinator coordinates the e8ecution of the /arious transactions (both local and global) initiated at that site. #7. *hat are the ad/antages of single loc2-manager approach in distributed databases? a) $imple implementation b) $imple deadloc2 handling #9. *hat is read 0uorum Br and -rite 0uorum B- in Buorum (onsensus protocol? %he 0uorum consensus protocol assigns each site a nonnegati/e -eight. &t assigns read and -rite operations on an item 8 t-o integers1 called read 0uorum Br and.-rite 0uorum B-1 and that must satisf" the follo-ing condition1 -here $ is the total -eight of all sites at -hich 8 resides. Br @ B- F $ and I B- F $ );. Define robustness. %he abilit" to continue functioning e/en during failures is referred to as robustness. )1. *hat is the difference bet-een bac2up coordinator and coordinator? %he onl" difference in function bet-een the coordinator and its bac2up is that the bac2up does not ta2e an" action that affects other sites. $uch actions are left to the actual coordinator. ) . *hat is the function of election algorithm? 6lection algorithms enable the sites to choose the site for the ne- coordinator in a decentrali.ed manner. 6lection algorithms re0uire that a uni0ue identification number be associated -ith each acti/e site in the s"stem. )#.*hat are the basic data partitioning strategies? a) <ound-robin b) =ash portioning c) <ange portioning )). *hat are range 0ueries? Locating all tuples for -hich the /alue of a gi/en attribute lies -ithin a specified range (for e8ampple1 1;;;; Esalar"E ;;;;)5 these 0ueries are called range 0ueries.

),. *hat is inter0uer" parallelism? &n inter0uer" parallelism1 different 0ueries or transactions e8ecute in parallel -ith one another. %ransaction throughput can be increased b" this form of parallelism. )3. *hat is intra0uer" parallelism? &ntra0uer" parallelism refers to the e8ecution of a single 0uer" in parallel on multiple processors and dis2s. )4. *hat are the t-o forms of interoperation parallelism? a) +ipelined parallelism.b) &ndependent parallelism )7. Define Object-Oriented Database $"stems. Object-Oriented database s"stems are proposed as an alternati/e to relational s"stems and are aimed at application domains -here comple8 objects pla" a central role. %he approach is hea/il" influenced b" object-oriented programming languages and can be understood as an attempt to add D!M$ functionalit" to a programming language en/ironment. )9. Define Object-<elational Database $"stems. Object-<elational database s"stems can be thought of as an attempt to e8tend relational database s"stems -ith the functionalit" necessar" to support a broader class of applications and1 in man" -a"s1 pro/ide a bridge bet-een the relational and objectoriented paradigms. ,;. Define persistent programming language? A persistent programming language is a programming language e8tended -ith constructs to handle persistent data. ,1. *hat is star/ation? %ransaction gets rolled bac2 repeatedl" and it ne/er allo-ed to ma2e progress. %his is called star/ation

PART-B 1. Object Oriented Data Bases

weakness of RDBMS Semantic Overloading Poor support for integrity and enterprise constraints Homogenous data structure Limited operations Difficulty in handling recursive query Impedance Mismatch Other problems with D!MS

Concepts in database and storing objects in Relational Database. "bstraction# $ncapsulation# Information Hiding% Ob&ects and "ttributes Ob&ect Identity Methods and Messages 'lasses Subclasses# Superclasses# Inheritance Overriding and Overloading Polymorphism and Dynamic !inding 'omple( Ob&ects issues in OODBMS ) problematic areas for D!MS

a* Long duration transaction b* +ersions transient versions ,or-ing versions eleased version c* Schema $volution% i* typical changes to the schema% subclass%

.he propagation of modifications to subclasses

o o

.he aggregation and deletion of inheritance relationships classes and creation and removal of classes% Handling of composite ob&ects%



0%'lient 1Server/ Ob&ect server Page server Database server 2%Storing and e(ecuting methods/

!enchmar-ing/ ,isconsin benchmar .P'1" and .'P1! .P'1' Other benchmar OO0 benchmar OO3 benchmarObject Oriented DBMSs-Standards and Systems.

Ob&ect Management 4roup .he common ob&ect request bro-er architecture Ob&ect Data standards ODM4 )%5#0666 Ob&ect Data management group .he Ob&ect model .he Ob&ect Definition Language .he Ob&ect 7uery Langage ad antages and disad antages of OODBMS.

!d antages "

$nriched modeling capabilities $(tensibility emoval of impedence mismatch More e(pensive query language Support for schema evolution Support for long1duration transactions "pplicability to advanced db applns% Improved performance

Disad antages"

Lac- of universal data model Lac- of e(perience Lac- of stds Loc-ing at ob&ect level may impact performance 'omple(ity Lac- of support for views Lac- of support for security


).Query Languages


%he classical seriali.abilit" theor" has been used successfull" to pro/e the correctness of most concurrenc" algorithms used in traditional databases1 but needs to undergo some changes in order to accommodate the nested computations inherent to OOD!M$s. ,. transaction a transaction is the program through -hich he or she manipulates the database. Hrom the /ie-point of concurrenc" control theor"1 a transaction is a representation of a programJs e8ecution as a se0uence of operations on the databaseJs objects. %ransaction management or concurrenc" control is the acti/it" of coordinating the access of transactions to the shared data -ith the goal of pre/enting transactions to interfere -ith each other. %here are s"stem in -hich transactions need to cooperate and e8change information1 but in -hat follo-s interference among transactions is regarded as an e/ent that must be a/oided. %hrought this -or2 -e -ill refer to the comple8 mechanism performing the concurrenc" control as the %ransaction Manager. &n the literature1

sometimes a distinction is made bet-een the entit" that recei/es transaction re0uests and the entit" dispatching the operations for e8ecution1 but a more comple8 description of these entities is be"ond the scope of this -or2 and does not bring an" bene t to the concepts being presented. %he solutions to the concurrenc" control problem are the schedules de/ised b" the %ransaction Manager so the" need to be e/aluated to ma2e sure that the" meet the correctness criterion chosen b" the database designer. &n traditional databases1 the most common correctness criterion is seriali.abilit"based and the most used control mechanisms are based on loc2ing K3G 4G %he object-oriented paradigm has changed the classical concurrenc" control approaches in the sense that objects contain in their specication semantic information -hose correct e8ploitation can lead to a better usage of the s"stem. &n this -or2 objects are also assumed to ha/e their internal concurrenc" control mechanism that ensures that the operations local to a particular object are e8ecuted in a correct order. %he local object scheduler also ensures that e8ecuting the operations dispached b" the %ransaction Manager obser/es the consistenc" assertion established b" the s"stem designer or users in the case of s"stems that allo- schema e/olution. %he o/erall design of an object-oriented s"stem must ensure that the separatel" correct schedules merge into a global schedule that -ill be correct across all objects1 -ithout deadloc2s and c"clic restarts. !ecause the ph"sical location of objects is irrele/ant1 the same concurrenc" control can be used in both centrali.ed and distributed /ersions of the object-oriented database. %he safest and simplest -a" to e8ecute transactions is b" scheduling them seriall"1 -hich means that a ne- transaction can start e8ecuting onl" after the L.

one that preceded it either committed successfull" or -as aborted. &t is the safest -a" because -hile a transaction is e8ecuting all resource are a/ailable to it e8clusi/el" and there is no possibilit" of con icting access to them. &t is also the most straight for-ard -a" of scheduling transactions1 but ne/ertheless the poorest in terms of performance (utili.ation of resources). %o ma8imi.e the utili.ation of resources the optimal -a" to e8ecute transactions is b" ha/ing them run concurrentl" -ith the interlea/ing of operations controlled b" the %ransaction Manager. OOD!$s are particularl" suitable for concurrenc" since e/er" object can manage itself an associated 0ueue of operations and in concurrent object-oriented languages the objects can ha/e more than one internal thread of control. =o-e/er1 concurrenc" means that there is a possibilit" of transaction interference and thus consistenc" /iolation. %he follo-ing t"pes of inconsistenc" ma" arise5 M Dirt" read5 occurs -hen a transaction is allo-ed to read a /alue of an objectJs attribute that -as modied b" another transaction that has not "et committed and is a /iolation of the atomicit" propert". M Lost update5 happens -hen the durabilit" propert" is /iolated in the sense that an aborted transaction t1 that had access to data modied b" another transaction t -ill erase b" its roll-bac2 the pre/ious modications thus canceling the duration propert" of t . M Dnrepeatable read5 occurs -hen a transaction that re-reads a data item -ill get a erent /alue from the one that -as readrst because meantime another transaction had access to that data item and modied it. di

%he inconsistencies listed abo/e need to be eliminated b" regulating the -a" transactions interfere in the s"stem. %his is the job of the transaction manager or of the central transaction manager and indi/idual object transaction managers in the case of OOD!M$s. %he regulating process should ensure that a transaction is allo-ed to access a data item onl" -hen there is no possibilit" of interference -ith other concurrent transactions. %he most common regulator" method is 2no-n as seriali.ation process.

6. Multi Version Locks