You are on page 1of 39
= BCD pry BSD) = Boor Apely CDE) CATE Bepen (nsty E29) \ente A Wa Candiclatar key . Similarly, we Can tind otter Cordidele Keys a JEL feos. and Bae CG) Lhe highes Noval Foon WSF: Since all ave pare attatbutes- @® Feilowrg Eps hold OROWBLBED B, BOSE, EDFA @) Find Cardi ® ef SHED O TEE ORES f yr Reply AxB) @) candidade Keys &% Ora en (ES* = EPAB ey 2+ Cornbre them, ne get. Acyyt= AcDBeE Ot = EDCAB (Beo)* = BCDEA S.cACD, EDC ane Be we Candice key OR. (b) the Rlatomew im BNE, becartge all Pome attributes. CC) elation 2 Y Yt in BONE, &ecaud$e, nt every Candidot bey Ua Acterminant, o. ® & Net Ih Bcwe. ~~ 156 Notes Written By Mallesh H L, Assistant Professor, SIET, Turmkur - 572106 fomcia UTI J © Exsiain the pmpertes oh Relectipnal Decomposition. The prpater & Relate Ee ci) Peribute peaesvation Prpets (W) Degenceroy Puedes vation prperty (Ui) Logs lest 08 Nonaddctive Join property Ch) Adtitorte pregevvation property: Each odtyitarfe in Ro weil afieas in at leatt one elation Vchema Ry the de cooAposi tion Zo two NO aitsioites ave lost. % Paoter Geol of de compos (tion ig ts have each individual welaction Ry inthe de composition D ke in BNF SNE- 3K Additional psopertes oe decomposition are needed do peerent the generation %% Spurious tapes | (i) Degerdenny ‘Paetervation prpnty: | | x, pepondenty XY kn the Universe selaton R shald ettnes Appear divecthy im Aorne welaton Ry Ts Cam be ingested oom the che Ri. ig not n/ecwMary thot all Lependoncies the Telation RB APROat in Bore welation Ri. EE U Bubticvut that the DBMS Notes urmnion of the dependencies on all the telatine Ry be equivalent to the dependencity om R. (iii) Logg tess or Nonaddtive Toin pragerty « N de Composition ig loggleas, tr the vedult of Toining (natural soin) all the de composed velations together contains alll the juples toom she original lakes and does not Contain any other noes 2) woite the algorithin tor texting non additive we = Toi pooperty.(qJune/Tuly 2e13) “Testing bor Non additive Join Poopeaty Algositrom. Input : & universal selation R, a de Coma porition and a Set F Bt = 3 Ry, terreRem f BR, om Functional de pendence (Fpe). inch pein S with one sow - dveate am inital me ares cath elation Ri ™ D and one Column | 4yor each adiviok Ay MR. Q. Set $4, 5) ve big dor all matix entries 3, for cach vow 1 Bepedenting ree lation Schema 3 tor wath Column J Depesenting attatbute Ay 4 te Crelation Ri Includes attribute 45) then fet S@,J) == ays hsts 158 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DeMS Notes A. Repeat the tollowing loop unk] a complete leop execution vesultt in Mo changer te S. 2 tov each Fp XY WF for all vows im S that have the Same Rywrbolé tn the Columns Corregpording to attribites MX 2 amake the Symbols Meath Glumn that Coster. pord te 09 octt-ri bute in Y be the | these wows af bellows * Same al Tb any ob the ‘wows has an a& Syrtol Bet the other SOW tp je re cow bol in the alum. that game a aye Ib mo & Bymbo| ex in ony & the Ts, : b gymbols thot Appears [9 one a the sows yor the atitviowte ama Bet the other vows 4 that Same b gymbo| in Be column 3 65 $555 5. BP a tow rode up & entirely a symbols, then the de composition has the Nonaddi'tive spoin Property , other wite , it does not. @ write an Algorithm to bndakey K tor B, Grew a Sel OW EDs. iste tor ‘the attwitute Choose One he Neon Input: A unversal Velation R and a et & Epes EF on the attuibifes ob R. 759 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 A. fet Kt=R @. Fos each attyvibrte A in K $ compete (K—A)* with sefpect te Fs ib (K- -a)> Contains all the ott ribates tn Ry ten Set KS K -TAEES fours } and D= Ry, Pe, Ba wine Ry = EMP = 2 Son, ENawne } i I Pa = PROT = > PrNumber, PName, Plotaton } a ne we 2 Ry = Wores-on = 3 Ssw, Pdumber, Hours 2} “tha following Ebé | hold ¢ on elation R. eee a = } SQn > Enome; 3 Pruner > | prame ~~ pUwealtion Fs Yeon, FN PNumbe fo Howe F uove thot “fhe above decomposition ob telatton R “hat the Vor ees Tei Property: Cunefuly 2015) Ce EES ET SES hehe ae 3 velation: Ry, De ard Ry. Const ct a watdx, Such thet till all the Yous y mol - jit. wh o \ Prumbar | Prawee | et plocaton) How bB Ba | bis 7 bea | Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 Donte - Replace the b Sysn bo with a Symbol tor tre orveg.pording acttibutes in ‘the ¥elatons. [Sex EName | PXumber| Name Plocaton| ounzy a a | a | be bin | bis by bes ag On Qs = — . = bee ag 3 35 _|_—— —> EName dint ED Sen , _ have Oy Syn bo | in SSN Column. es we Bs Bhould be Changed vespordling “EName Qlamn . a ™ Pa & ENasse Column. ‘ 2 oy | E Name | PNurnbet Paawe | plocation | Wowd Ri] a as big | by bis! by “a “bog Pol by bos as cn : as || Oe “bee Az | As bay, es) & | : Now apply, aett FD, Prumber— Prawe, Plecation Pyumber Colurnn has game a Symbols @3) Po and Rg. « Change in Pare Glurnn avd plocatter — Glurn ty Covresponrdevg a Symnbole 1 ad 95° bau Stould be Cote aueck replaced by OH and bys Ahold be Cotted and weplaced by 25° Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 Tel ao ENawe | Pam) Prame | plocatin J 1, a, ap | ° by bis ber ay As fie a as bau y] bag as | Ag. Now apply, third | Fp, SSN, Prumber —s Hou But at tht Stage only ( betove 4 bing third Fo), Rg Pow Contarnt all ‘a Lymbols. + the Be Corsposition y logs le ox it gatit er non addchve oin property. Fmal 6) tongider R-faRcert Eps “Epa $asoc, BoE, A> prt Check whetrer de compogstion ig lossless, “CBetember Yor) Jere, Pelatore ale net Hived. we should I wake ov Create 2NF welatione oct db Funchal Be pendon ciey (Eps). Notes Written By Mallesh H L, Assistant Professor, SET, Tumkur - 572106 DBMS Notes. Dividing “each FD as one tabe, we gee, ABC = ABCHR Boe = BE=m& Re DF = ADF.= Rg Or else, HE can ‘ind out candidat Key nd then apply BEN porrula, we ak ine soe we lation! R,, Pe ard Ra ,even apter tyne roula. ; applying BONE Crate a Malvix with b Symoolf. Bl cil Ol EF p, [bu | be | bee set bie| bee} Bue | bee [Pe Bo |?” ba| ber | °2 Day | bar jhe! 31 Replace tre coves pording attdbates @ re lachony PR, Py and Ry art ther apply PFDs. y a Ri [Or | Ge | 43 | bo} Oe we fey bee boy | Ge | bee 4 Qe | be Os. ef hoc 35 1c Pau ws Abies applyiyg tivet Fo, KE qek rhe roatsin, @ ~~ «168 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes A) Bic ]P) EF Rif a, | Go} a3 |b Bstbi Pe New apply Re}bs| Ae | Az |ba{ as] by] Send ep, 4 bee] Ag AH bof a} Boe Wwe get FAT BI c] DI ELF R[ a | 2e | 98 Bil 45 Oe on apply Re bo| a2 | 43 ot ed thivd ED Ry % Bye] Oa] Go Paley sp Fivol matkx ag ay | ay| 4s | 4 ag tr,| A] | ae the Row Ri in the tiral Mafyix, Contain only ‘a’ Symbol. o De Composition ig Logs eM. / © consider the scheme RA, BCD E) whith B decom pated ints B =a) Vand BCD.) ioe With the_ pollowing Luvetionl 4 depenctencier, 164 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes ta LOBB—Leks JOIN de compas Ganuafemmeye) Thee ae @ we lations Ri, Pe Creat, A Matix yjA;BYc]P/eE Ry| 0] ae] 4% biy| bs Kegly oar FD pp |b bee | Ag] 4} 45 ee Contam ‘a’ Symbo) yous’ we Cannot opply. Rut no 2 in in A Column, - E. ow apply CD> Cand D Glumnut Bhould ee in the @ BON only C hag we Cannot apply. Mere algo, Kame A Hence thts decoragetitren y ot lostled Soin. 165 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes TH UW @ lossy goin. Th these axe only Q ve latory, a then Ine Gan apply this torrnla th ChoCk © Whether the de Corapositon GY Lotsleds Join R NP) 3 (eg, —®2) os (% 092) > Re *) Tk we apy above & re lection sty his tormula, We get (Axe 0 CDE) —s (ABC _- ce) Cc +s AB lve donot hae any Fp With ‘CAB. De Compotifian Cy Not oakleg Join. Agel; Geond tormala, (age 9 coe) —> (cpe- ABC) C -+ PE Again, we donot have any FD with C> DE. thence the de composition & ot loge ledd Soin. T+ | Loaay Be Carn pagiho - Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes ST @ Congider the Universal elation R=} A.8,¢,D, EVE, Git | Th and ao Bt @ EDs Ea FP agjotcy io Det, wate, holdntiee at. , Find jhe bellowing: Re ti) Delermine the decomposition D YR, Be, Ps, be, Pshz Riejh 8 ch, WELADEL Rea fBet, Py ate G Hb Bs: (g leatlen oin_decone (1) Key to Ri (asyt = ABC (Aost4 AB->C) = ADERC (Apply APE) > ADEBCE (Apy B>F) = ADEBCE GH (apes F> 6H) = ADEBCEGHIY C apnPLs 3) a, (Ap = ABCDEFGHIT, Which & equalts gren Relator R. ABU a Key. Gi) NO Actesraine Logsles Join Decomposition 167 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes Ceegte the Mathix. alee ple lei lst ate Qy| Og [ore se BASS eral bas Be] O; | bee] HS} Oy. |S] bee] bey] bnel 2] Beh Rg] bay | ag |-be4 bay| bec] Og bss | bar] baal b3 40 Ra] bay | bye} S43] bys jbus | ag) 47] 4g bush byte ®s| bsy | bs2 | 253] 4] bss] bre} fr|4s2| 25] aig Apply fit Fo, AB SO Wwe Cot byg and 633 + ag Apply Seand FD, ADE, we lt biy avd bis he Ay, Wd as we epectively. Apply thivd Fo, Bor, We Gt bie te Ae- Apply bourth FD, F > 4st, we Cot biz avd be +e AT avd ag gesge tively we alto ot bz7 ad beg tp A avd ag wepectively, Apoly $itth ED, D-s rx, We Gt byg ard big tb Ag avd A105 Wepe CAVE ly, We algo (ot bog and boig to Ag awd. Ay vos pe chs 168) Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 : tthe Fival Matix laore like as follows. One Ces altel Gee as| 43 44 As\ Q6} 49) Ie Q3|\ AH) Is bid ba 4 bas] Ar | 43] bau) Bas| Ae] 0-7] 78 | byl basy| bus|Ce| 7| Fe bsx.| 6s3| Ay| bss} Se bss tre vow «R, Comtaing al Tt @ a 108BledS Join cde Composition. ANE: A velation R WB gaidte b be tourth nosttal torm GWE), Fe, tor every MuttValued Dependenty » Xr Y that holds over R, Ore AH the tollowing Statement & true: * VYOCX os XY=R KH K UW A Super key Inclusion Deperdonty: Cuppose attyibute eet y 769 | { Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes in Schema So & a Forwin key (EK) cyeterencivg primbry Key % ob athema R, then this oretgn Key Conetraint Can be Tepetent- ed by an Inclusion Dependency SV < RX, indicating that gy te included in BX For exampk, DEPARTMENT.DMgx_ ssn < EMPLoyEe. Sgn WORK.S-ON. SIN Z EMPLOYEE. SSN ete DENF: DENE lg also Called ag Domain -Key Nowmal Form, A ylation Schema if Said tbe wm DENE ff all Congivaints and dependencies that hould hold om the Valid welation states Can be entored Atenply by entor cing the domain Gnetraints and Key Constraints on the elation. Template dependency: template cependencia provide a technique for represerting Congtvaivts in relations. there ave & types BH templates : tuple — genera teing lemplates and Constraint — generating temple for. A ernplate conststs ob a Number a hypotheAts tuples that ore raearct to &how le Ob the tuples that May appear an exam in one or move reletions, 170 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DoMs Notes SNF: A Schema R will be each Tein Dependonug (Ri, Ron) holding on R Battgtres one ob the \0 to\lowing Q Conddtrons ! «) mH w& 4c ivial Soin Dependency (TD) that vaeang at leagt one & the Prefecttons Ry ( Y. ine Use clouble aver to are poeta Multivalued Depordoncy- ve vead tnit a3 % Multidetermined Yy. Ty Lteplee +, aud +e exist, tw welechjon Arete “¥, tren 2 other tuple +z avd ty Should allo extet in welatim Spats ¥, rorvth the ‘following fosoperey. Ty tabled Leo can Wale let EMP Name = %, ‘PwjName=Y, Bepname =Z tron (XJ = tefx]= tal] = tule +: \\) = 4,[Y) Ly} = taf) ot NIE SD = tule) ove 2 = SE. Ih YY Sey tren algo X3>Z. ie, EMRName >> poryect« tren also ENP name > Depname . Swmehmes, we wile Xo? y \z EMPName > Petname| Depria e " 173 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes Fourth Noval Form (/-NF) + LINE Y baged O17 Multivalaed Bependonp| Tk ye have more than one Mulfalued attain Ade prefart in a aelaton, then we Lag that Tk t not fn NE, Tt will be in Bene , but not ta Gne because EMPName > PryName amel EMpName ss DepName, EMPName & a Cardi key oe FR in Bowe but wot in HF. Thi wlahong hip mopretit, HO trivial MVD. Tablet Contaire all key relator CAN the 3 altriodtey Mepwetert & Canodlidate key). 4NE Says that, we Bhould have a trivial MvD awd if yx >sy, x maudt be a Saperkey, thu in order ty make ENE relating, the tobe EMP is Split iw g tabler, Emerge and EMP Dependutr. Tu tebe tom, we Wate 95, TEMP Name POP Name \EMpName Degname Sraith x Smith John Ssnith Y Sint feuna Remy- peorects table ie a ee Now there 2 tables ak in 4NE. Tn the Monctrivial MVD, anomaly Wil] are We need f Grvert te ANF. 174 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur -572106 DBMS Notes = ANE 1 Ugebul tor emoving Zo me Kind ob vedurdancy. ANF Veo oye extept that i Uses MvDs. © What K Meant by Axivial Mv and mon trivial vial MVD a An mMvdD Xxaoy MRE called a tyMal mv ib (@) yy a subset d x(Vex) ox (b) AVY-Ror XY=R For eyamglk, the AWE oe labo EM ?—Propears Ond EMP DEPENDENTS exo femal mMvpé. Recauge, ™ EM P_ Prorects , Engatame ard propname Condytate R. .”. we say that We tyimal Mv. pn MVD that Bartstres neither (a) wor (b) W Called a non wivial MVD. Emp relation & an examyle pr nonwivlal Mvp. Tn Emp velatm , we have S acthn butter EMEName , PO}Nawme avd DepName. “ yt then tx >> (R- guy) @ Aogrrentation ule : Tr 2 SV od WZ then Wx —>> Yz. Tr fry, Y257 | thn X 2>(2-I @ Pepitcation Rule i Ty [¥ SY} ten X>>Y © Calesence Jule : tb x2 Vv and there exvtts n ix emg res thot @Mwoy | empl rover b&b WZ avd qo) OE then XZ. Wate jhe LENE de composrtion Algoritim with Nonaddi'hve Join Prrperty. Input : A universal Telatin R and a Set db functional avd multvalued dupendencies F. Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur -572106 Wo oiwith the 176 DBMS Notes 4. Set Di= Spt; Q. While there & 2 relation Achema @ inD that & not in 4NF, do 2 chooge a Welahon Bchema © in D thot & Not in ANF; aind a momntrivial MVD X>>yV an © that violate ENF 5 replace Q im D by two *elaton Bchemas (Q-V) and (KUY); i ® Give the algorithm te Chee dependency Pregervation amd LOM leat toin (te. BNP Syrrtnesta algortom Batistytng boty, dependency preservation ae Lostle & Join property J. (Fely/ August 2005 ) Trput : A universal velation R and a det & OR F on the attribuks ob R. 4. Find a minimal Crt 6 4o0 & &- For each lett hand-side “X Of FD that Appears tr G Create a selation &thema tn D Wet adteleshs 2% UIP UL Aap oe UES, Uebare es Ay KO Rare KO AK Ore tre Only Depend in G with «ok tedthand- Side (x Ute Key 04 tit relation): 7 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur -572106 DBMS Notes 3S. Th None d the velation Sthemag tn D Containg & Ke B&R, then Cxeat one rove gelation Schema MD nat Corrtaine attributes thot torm a ed ok R. J. Elarninate sedurdant selarors 4yom the vesuttrrrg Set ok velatone tn the *Klatonal Aatabage Schema. A velahon RE Considered wedundant t R iB O projection a Anotho- welaton S in the Btherna 5 aliernate ly, R& Babsuroed by 8. @) Wsrte Bhort Notes on SNE With exarge. Fikth Novrnal Form 6nF) deals With the Foi opencloacy. there Ty orelationdshipe among the octtributes in sth vormal Form. But Toin A velaton R UW Baid to be in Syne, i} thee exuk a trivial gp si Dependonty), Ov We projections Ry ie a Super key BR. To in SNF, the welachon MEE be ty AVR BNE te alo Called af Pajeck Join Novnal Form Por example, Consider the velaton Supply] hig Supply telat hay & Jorn Dependency. Tt U ‘Not IM SNF, To Convert b SKF, uve have te Split the Supply table into ; 178 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes Q table. Supply ( Suppname , partrame , Pr7_Nare), tf a orgrwal table, which y Not im swe. The 3 tables are Ry = Suppname | patkname These tabla oe Re = PattnName, Proj-Name in 5x Ry = Suppname , P¥oj Name Tb we Split te ongral table us, iets Btables, Thon lave get Spurvioos , ober Tointyg Q tables. On tre Other hand, ib we join 3 tabs, We donot qet Spurcour tuply, Se Ade the OFT ginal table tte Stabler. Suppty tabu Soppname PartName | PwyName Smith Bott I or Srnith Nut = Y geet yet | Adamaig | Bole PUY xe aN Wa thon hut ) paz a ght | Aclarity | Nail | pix yoo | Adormsy| Bott | paix mith | Ble [PSY Aéter Splitting, Orqnal table Susply, wre get 3 tabs Ri, Reand Pe. Ry Wa Super key, Re Ga Nupertey and Re & : 179 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes te get O Super Key. Ri Ke Suppname |partnarve Bupprame [Pej name . [Row OT Smtth Prrn Smith | Bolt _| “ Smith [Nut f= Lrnith wei y Adamtyy| Bott Ardara ty Pi I Walton | Nut C Walton pel TS Bdarssy Nu Rdarnt vy | Pe Se SNF relator Past Naroe | PMT ce the Bat [| dar Batt prey gnuch burtner. Nut Pelz = _|_ Nai pax _f © via cuss the Nu value and dangling tuple pwoblenv. Cure] suly 20n) one pooblem occurd when Aome type have NULL Values tov alteibeter that Will be Uses 0 Join {ndividual telahory tn the dc Co mpoattion - Suppose, these ae ® tabley EMPLOVEE and OEPARTMENT. Asune nenly hired employees ahe not Yet been Ahigned a Depaltment Number 180 De Darirnent, then Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes bewmes NULL value tm the Employee table, Now, Th we Ton EMPlouce and Departmen these Q@ newly hired Persons Worll not appear tm the somed wesult. theretore, wwe Should fake partcular care ter NvLL Valuer in boreiqn Key, Wis Can Caude Unexpected lo8s Bs information In queries that tnvolve Joie on that torveign key, Moveows, ty NULLZ occur tm other attnlbaites, fee ‘ ct on bullt- tn pun cto cee ‘hes ebine Average must be Casetully €valuated. A wloted pw blem & thet & dang ting fuple, which may oceus tb we Carry a de Composition too tar- EMPLOYEE toble Th we Spit tre tabla [ecw Exame_| Dio EMpLoyEe ay into 3 Prakath| 10 tabler, we get Suresh | Qo ENP LoyEE_4 Vatnrth | NuLe ——— Son [EWame | Pprakalh L Suresh & Yatni th Ma het hy iat Notes Written By Mallésh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes: EMP LOVEE-S ee Dro_|_ withoot Null table 7 Now, rey Wwe Jorn PMploycet and EMPLoyEE_& , we get the onighal EMPLovEE fable, On the Otvrhand, Th we goin EMPLOYEE-L and EMPLOYEE-S, two tuply Bhe lost - the “tuples ‘Yathi th’ and Maheth' wrill not appear. thee tuple axe Called ckangling tuples, Becaude they (Aamg\ ing 4uples) are Predent tn catgarad, E-MPLoyeE-d elatom only. Hence these uples ate lott, It Wwe Toi Employee and EMoyee zs tables. Exglain In Clution Bependonty avd DENE Dorian key “noral Foe), ae Lee! meee RK boreig Key Constant Cannot be wepeesentect Ce Kepredented Uting an Trclucsiion Dependanty .- . Suppot; attibete St y im Schoma § oa Foreign key (Fe) Deberencing Primary Jeoy XO Schema R, thon tht horeiqn key Gnehair 182 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes Can be wepweserted by an Cn clusion Bependenty S-¥ < 2X mdicatyg that Soy & wcluded - m RX. sthit Condtramt Bpecitrers that tora | Given selaton wR), € a Yelaton S@) Would be Valid only te it Zatietner - mHCs Cs) & Ty C®). Suppose trere ate Schernal Accovat(An, Bn, Ba)| amd Biomch (BN, BC, Asst] Where By u Fovetqn key in Accounr Seterencing BN in BRAncH. hin droxetqn Fey Conghaint Can be epetucted by includion dependency Account Bw 2 BRA ay M with o thes types Gf Lependencies , trewe ade inclugion dependancy inbernte ruler. the Aoilowing Ae 3 example TRA: (veblexi wty) bP.u 2Q-y Tre: ( Attribute Covtedpondurce),: c pew 4-S-y and Meth, by Anh anal y= 8, Qs, “Bat awl At Covredgorde +p Bi a ) sign, theo Ht will have i RAr < S.Ry trai. {| Notes Written By Mallesh HL, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes pss (rrangitsvit): Thr Rex BY and SY Tz then Howe have RX 47.z DNF Gomain key Normal Form) + Tt has been posacble te de bine Btricter Normal tovme that take inte account additonal “types 5 dependenciey aud constants. the idea behind Dornain—Key normal Form ®ynr) ty to fpetiby “the Wtimate normal torm that states twte account All pohdible types & Clepenclenciy and Condtrainte- A velahon &chema Baicl f be in DENE ib all Comgtramk and dependumcre that Should hold on the Valid Belation Atates Can ke Cntored Sisnply by endorcing the Gownain Gnkgtamt and key Congtramtt on tre Selation. For a wRWlatfon tn DENE , tt becomed Yery Rtvaight torward to enbome all databage Conatsainte by Simply Checking that each aitsibute value in actipk Uw & the Appropwdte domain Wd thar every key Conkttraint & enbvrced. thowever » becaute tthe debt icutty oh i184 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 [osnstcces including Complex (ondgtraink IM a Dkwe welation, Fre peacheal Utility U limited, Since Tk way be Quite dibbicult te Specihy genera ndegrtty Constraints. what & the dependonty puedexvation Property dora 1 Aa com goxihion ® why is It iynpottant 2 (Dec 2012 2013] tan Tan 2014) nae Tt would be Wetul Geach FD xey Rpecthed IM F either Appeared airectly in Oy the velation Schemas Ri fr the | one D or Could ke ‘\nstrevred ae @enpo echon the Qependancies that appear in Aome Ri. Intormalig, this UW the dependmoy preserva Kon amditon. \we Wank to Preserve / a dependencia because each Aoperceny MM F Tepresente a Congtraint on the database. Th one a the depenctenciy not Veprekerted in dome individual elation RE B& the decom pogition, We Gnnot endore +Ht£Z Cone traint by dealing Hith an indeviduel ve lation. \we may have t yom “Ma lhiple welationg do arty include all attribute Involved ty that depenolenty, | Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 ror, DBMS Notes Tt a decompogithon YL Dot depmden Cy—preservivg, gore dependency & lest fy the decomposition. Te Check that a logt ependurcys holds, we must take te Torw QR Q ox moe Telatone in the decompo Rion -bo Got 0 Be lation that includes all lett-and— ght hand-Gide attributes @-the Logt dependemty , And thon check that the Aopendunty holds om the Tedult & tre Torn— Qn option that ie Not psact cal. eo. Tt G alwayl po&ike to tind a dependency — prederving de compodition D tits weapect te F uth that each elation Ry in D & in SNP. Consider the Relation | RAB 6d), Chere inet the de de Com composition uy__loas eon Dah, and Relations ae "Rie BC, EDA DAs Paz BP Create a Matrix Apply Fos, we get Bic B LCT | Final matyix Gs| 43 be bes] | 42] The Last you Pa Contain only cl Symbol. Honce Hig lod lem Toin. | 186 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 © Give the ER to ‘elatioral mapping algorithm. Discuss each Sep, with an exonnge. (ane 208) 202) — —~Gure| July 08) ee 0: Det 07) 3an 06) <8) ER te Relational Mapping Algorithm congiste & | the tollowiig Sreps. @ Mapping ob Regular Entity types ® Mapping @& Weak Entity type @ Mappig te binary one-to-one Relations hip type! @ Mapping ob binary 1: N RelationPhie type | Mappig @ binasy Min Relatonship tipe © Mapping @ Muttivalued Areributes @ Mapping @ N-asy Relationahtp yee Consids O Maporng fh Regular Entity type: een }nsidr A ER diagiam 23 tows Hore Student and Course are Tegular (Strong) emttte. we have to Const 04 Tea Student Table Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes Course table Crame [ lection thege attributes ate Zirgle valued attributes. Torng B a “Relahonship type that Joiw & ents eg. @ Mapping db INeak entity type : Sidams NOG eee an ER diogram 2 eas Co sa DEPENDENT 18 @ Weak entity, becauke, Tk doce Not have tty OW primary Key. Tt depondg On the Primasy Wey ob Regular @rrorg) Entity. ie Covert the E@ aliagram as, EM ployee Say | Name Saloay DEPENDENT @ wagon Mape tng A Binary one to one PRelatiowhie teve |r Relahonship Can be done -in Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 188 DBMS Notes = 3 ways. Q@ Foxetqa Key Approach ( Merged Relahon pproach ® C50 se terente Approach oO Foreign key Approach: Here, Fowetqn Key Can be ingested in any 6% tre “ables. Now the Studut table Com have hones \ CNo | StuDtar ee Dusahion date | Cousde table © Merged Relation Approach? Ta thie approach, all the attsibute are Mersged nto ome tabk, as USN sane | proreno|cvo \crvame [eration [esate @ Cross Reberen(e Approach: In Cras Pebevence Approach, we can Coeake one row linking table. thie, we do Ufually tox the M:N Telochwrg hip type. Student —Cautse Linking table 7 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes &) mapping 8 Binary TiN Relationship type Bory T course | In thle approach 5 we Crate & ovelgn Key m the N-side d& o Relationship tyPe- T+ Can be Converted ag Student table Cooks tobe [oxo [erame Duration cost | Ven + +1 StupENt © Mosping & Binary Min Re lationdhip-type Congsides an ER Atagram cu, Course In hie approach, We Crake one ynove table Called Linking table Stu DENT | 0s5 | Nowe P howe vo (Gop CNO NAME | Dutebon [on STUDENT Course [USN [Co ] dette Limierrg tab — ! Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes: = © Mapsing ob Wuttmled attri Addex attvhute & STUDENT -enhty 12 called Muttvalued atrbute and tb U arepresented by dlouble ellipse. For each anuttivalued attribute, we Create Ee parate abe. hut one mor table 18 Created doe Adee multyalued attr brte- @ Mapping & N-ary RelatonShir type : Mapping 65 Neary RelatowShip “He feve Surpuree, PAPT, PRoTecr We Called ad Regular etre. Supply y a Relotionghip. TH UW a bernary Relationship, type. We Ceeate a Separate tables 131 Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 DBMS Notes _ Le hor each seguler entitige and one more table « bor SUPpLy Re lationehep. Son | Suppuseerd | Swame | Rddew p——— PART AetNo | Pawtname table [rene [Pee ame table Notes Written By Mallesh H L, Assistant Professor, SIET, Tumkur - 572106 + 7 —_ UNIT & “TRANSACTION MANaGEMenT _US—4 © Explata the AGED properties Bo database Tran £action (qure[ruly 2013) oR. ini Shot Notes o9 “ACED properher ACID vacant ftomicity, . Conslétency, Trolation avd Pies 20M Ten 2015) Trangachorg Should posserz’ Several propesrtres, Otten Glkd the ACTD Propertie, The bo\lowing ade the ACTED Properties: ) _Atomicty: A tranatton Kk an Atomic Unit ob pressing 5 Tt We either Pestormed ov mot at all perbomed 2) Gnaigienty; AL rangaction U Consistency preserving te ity Complete exeurtion ta Kes the clatabase trem one Gnaisient State te another, 3) E8olation: A Franlaction Should appear as though Ue te being executed nm Colation tom Other tranfactond. that Ue, the execution OF a dearntachon Should Wot be Mtered with by ang otwer tansachine execterng Concurrently, 4) Durabittty: The Changer Applred to the Batabase by a Gmmitlel trantaction must Peratet in the databage. these Changer Must not be logt becauge db any pailure. [Rotel pilin 6 mallee HL, Agt ProteMor, StEr qmrue-’).

You might also like