You are on page 1of 8
NAME: ABHAY PATHAK ROLL NO. : 0936C-819100.2 Sens ves 1) Explain Nowmalitation io Bedaid Fos ) Nowmatizat-ion of Database. Database Normalization it a Lechuque of ongamizing Lhe Bata so the Batabase. Nowmalization it a systematic apbscach of Becombosing tables fo eliminate Bata wedunbancylnepe tition) and unbearable chanacterisfics Like Tosertion, Update and Detetion Aromaties, TL ita multi-step process that puts Bata into tabular form, wemoving Duplicated Bata furom te wetation fables, Nowmalization a4 vted for mainky two puxposes, ELiminating weAunbart(v-sete+s) Bata. Ertuning Bata Seperdencie+ make Sense ie Bata i Logically stowed Nowmalization Rute Nowmalization ules axe Aivided spto the following rormal fous: Faxtt Nowa Foun Secon Noxmal Foam Thiad Novunal Foun Bene Fourth Novural Foun NAME 2 AGMAY PATH ROLL NO. : O§36C- 8191002 Sev; st Des 2) Explaie Functional Dependencies, Pos ) The attuamrtes of a tanle ib taid fo se dependent of each oFhewr wher ar atturairute of a table uniquedty adentifie’ another attoarte of the same fabse. Fox example: Suppose we have a Afudent foarte with attoswtes: Stu TA, Stu Name, Stu Age. heae Stu TA affoswute vniquety sdenfapies Lhe Stu Nore affuanuse of Atodert fable secavte af we know the student af we car Feld the student name associated with at. Thi id krown at functional Aependency and can ve written as Stu Ta SStv Name on an words we can say S#u_Name a pure fionatty Bependent oo Stu Ta Fosmal ly: TH codume A of a fable vnaquety adenfifies the colton B of dame farte then af can vepresented at A> (A+ +oute B a5 functionally dependent on af fisute A) Types of Functional Dependencies Teivial furcdional Aependency non faivial fuectioral dependency Mus fivatued dependency Transitive dependency NAME: ABHAY —PA-TPHtyg POLL NO. : O4%6C-0819100.9 Sem: th Ques B ) Explain Ouewy Opfimizaf-aoo Aas ) Query optimization i+ a feature of many wetational Baf-abase management AyAfems ah of hex Patabase+ Auch a4 grabh Satabase-+, The avewny ophimizer attempts to Befeamine fhe mosF efficient way fo execute a given query by conAidewning fhe possible queny plans. Generally, the avery optimizer canmof we accessed Aigectly by Users: once queries axe Avemit-ted to the Aatabase Aewverr, and parsed wy the parte, they ane theo pasted to Phe query optimizer where optimization occurs, However, ome Baf-arase engines allow guiding the ywery optimizer with hot, GS a wequest for sMformation fon a Bat-arase. T+ A queny pewrtoo with can ve ot Simple ot "psobing He abdre-s5 of a Social Secuaity rumbexr LIME CFG" or more Complex Like "esdsng the average Aataxy of abt Phe employed married mer ao Casifownia pef-ween the ayer 30 to 33, that eanr less thar thes Spov-ses,!" Queries welts are gereaated vy accessing wnetevard Database Bata and marsprsating at ie a 5 Since Aaf-adase ha: elds the wequesfed anfoomation. © ewes a0 mos Cate-4, and especially fox BE RVEFUIES OKO compley, Pecan quenies, he peeded Bafa for a weary Car Cobdected trom a database by accessing af an Asppenent ways, through Aitferent Bata—stuvetune4, ad in if ferent cadet. Each Oitfenent way Fypicaddy wequines different processing fime, Processing Lames of #he Same quewy may have Jange variance, from a fraction of a second to how, Beperdsng of the way selected, The puapose of query obfimization, which a4 ao avfomated process, it fo 4i0d the way to proceS’ a given query in minimum fame, The sarge posible variance io fime jwsPifies perfouming qwewy opbamizad-son, though faring He exact optimal way +o erecufe a Quexy, amony all porAibihidies, 4 Fypically very complex, time-consuming wy it4elf, may ve foo costsy, and often practically impossible, Thur query obtimization typically fries fo approrimate the optimum by comparing Aevewral common—sente altfewnaftives fo provide an a weatoradle time a "goo8 enough" plan which typically Boe’ rot Aeviate much fom fhe wet¢ postinle wesulf Ques 5 ) Explain Transition Processing Aes ) Transaction procetsing means Aividing iefoomatsor paoce+4ing up santo sndividval, indivisible operations, called tevartactions, that complete on fail aS a whole; a feartaction can’ wxemain in ar sntermediate, incomplete, Atate (So ofher processes can?t access the ferartaction’ + Boda void eather the frartaction has compleded om it had seen “rotted back” after failure), Transaction processing it Betsgred fo maintain Aafabas_e sobegaity (the consistency of vetated bata items) io a known, consispent state. A transaction, a PYbiCal example of which would te a customer odes, COMAIALA of a Atrios of events lacceptsng He order, allocating Aftock anf 49 forth) that ane treated aS a whole. White Htheonetically transac dion processing ib a subset of event Processing the sofegait-y Con Aide nations Betewibed above mean that af is taeated a4 a separate fone fson, Taansaction processing Aatarases ane Batabrase+ that have been designed Aspeciticalty to optamise the Pexfoomance of Ferarsaction processing, which ib often weferned fo a4 OLTP lonbine frap-taction proce4Ain3), Ques F) Explain concusnency Control techniques Pos ) Concunnency control ib provided in a Batarase to (3) enforce isolation among tratsactions, (ia) Preteuve Aafabate consisfpency Fhxough consistency paetexving execution of trattac tions, (Gai) wetotve nead—wrife and write—vead conflicts, Various concuaxency conf-vrol fechniques ane: 1, Two-Phase Locking Protocol: Locking iA a0 operation which Secures: peammission fo wead, OR Peamirsion fo writ) a data iftem, Two phase dockang s& a proces uted fo gain ownership of shared wetounces wit hod ertating the possibility of Aeadtock. The 3 activities faking place sn the two phate update algorithm ane: (a), Lock Aequitifion (5), Mods fication of Data (isa), Peteate Lock Two Phase docking prevent AeadJock from occuring iA AirAtourvfed systpems by weseating all the wetovuces af had acquired, if if i4 tod Postale fo acquine all the wetounces nequined without waiting for another process to $505 h v4GNZ a dock, This means that Mo proce++ i+ ever an a state where if it holAing tome ShaxeA vetouxces, ard waiting for atothex process to welease a shared wetovnce which af weqviunes, Thit means that dead Jock camof occux Adve Fo vetource contention, A Ferantaction an the Two Phase Locking Protocol can assume one of the 2 phases: (3) Growing Pha-te: To this phase a frartacfion can ondy acquire Locks but camof wetease any tock, The point when a #rarsaction acquines abl fhe Locks if needs ib calfed fhe Lock Pont. (as) Shrimking Phase: To this phate a frantacfiion can ony welease sock’ buf CaMod acquire ay, 2 Tame Stamp Ondening Protocol: A fimestamp i a tag that can we attached to any trartaction on ary Bata item, which Aenofes+ a Apecifac fame of which the transaction on the Bata item had reer vised so ary way. A fimesfamp can be imblemenfed sn 2 ways, One st fo Aanectly atsigo the cumnent value of the chock fo the terartaction on Bafta stem, The other it fo attach the value of a fogscal courte that keeps increment at new fimerfamps axe xequived, The #ime+tamp of a Bata item can be of 2 types: (a) W-#amestamplX): This means the Jates¢ fime when fhe Aata item X hat reer woaitten soto. (sa) R-famestamplX): Ths means the dates fame whea the Data item X hats ween wtad fuom, These 2 fimettamb4s axe updated each time a Avecesspul weadiwoite operation i+ perfoumed on the ata stem xX. B. Mutfivertion Concuanency Cort nol: Multiversion schemes Keep of vertions of data item to GNC EASE CONCURRENCY, Mudtavertion 2 phase Jocksng: Each successful waite vesules in the cueation of a new vetion of the Bata afem wouitfen, Time+tamps axe vised. fo dared fhe vertions, \lheo a wead(X) operation i+ i+4sved, Aefect a appropriate version of X bated on the timestamp of the terantaction,

You might also like