0% found this document useful (0 votes)
102 views

Unit 5

Uploaded by

local id
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
102 views

Unit 5

Uploaded by

local id
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
aD Darshan Unit 4 - Normalization Free of gg eh Optom Sr Basics of Normalization © Table Hizll redundant data A remove S2dlell WAU 3 Bott lA storage efficiency, data integrity WL scalability Lulel e512 Ast data Normalization 88 8. © Relational model 4i method WA Alel B F quantify §% B 3 database 32Cil efficient & AA Normal Form 5 ® Wet Ai algorithm WAG B B wlVet database A normal form Hi convert $2 B. © caituell: Relational database design ofl MAAS BHI data A All La oNsacuni wa B el redundancy A minimize 5€l a5l2 AA Normalization 88 8. Normalization Hi data loss el A database A 2s Secll AUL® table Hi divide SEALUi WA B weal tables ofl 42a relation Ealaari WAG, © Normalization MAA Al Seq AMD yo B: 1) Data redundancy U2tsat 2) Update, insert UA delete Relucll A uetsal. 3) Data integrity, consistency MA scalability AULZall 4) Disk space Uelsal © Relation U2 24S condition apply SAl GLE of result 5 B relation oj state E2UA B Ae Normal Form $B 8. © YEL-YEl normal form B ol yo B: 1) First Normal Form (1NF) 2) Second Normal Form (2NF) 3) Third Normal Form (3NF) 4) Boyce-Codd Normal Form (BCNF) 5) Forth Normal Form (4NF) 6) Fifth Normal Form (SNF) Normal Forms First Normal Form (1NF) © Relation R, first normal form (INF) ® WH sl 21612 Vl relation oti OLklL domain Hi atomic value Alek. OR © Relation R, first normal form (INF) @ AA sl etsl2Zi Wl relation Hi composite AA multi-value attribute MLL Aej combination at Ala. 4 | Dept: CE DBMS (3340701) Prof. Vishal K. Makwana aD Darshan Unit 4 - Normalization Free of gg eh Optom Sr Exampl Customer: Cid | Name | Address Contact_no Society | City Co1 | Emily | Nana Bazar, Anand 9879898798, 7877855416 02 | Jeniffer | C.G.Road, Ahmedabad | 9825098254 C03 | Peter | M.G.Road, Rajkot 9898787898 © Guest relation Hi 4 attribute Cid, Name, Address, Contact_no &, wélell, Address A composite attribute 8 @ society Wel city sub-attribute Hi divide elz ®. Contact_no ® multi-value attribute & Bui Ws S2cll Aul? value Mz sal atstal. dell, Guz of relation ine Hi otal, Problem: co UBai, WUA A city oti OLA customer A display Sell eset otal. St2EL 3, city af oil A society MD AsiAG B BA address AWS evlacuni wae v. Solution: © Composite attribute oti £25 sub-attribute A relation Hi GAL attribute Ads insert Sal. + First Approach: = Multi-value attribute Hi cLtulRai ctu Becll Acey Ala. a a otssl sa. = Multi-value attribute HL2 2Ct9l attribute relation Hi Insert S2l wat Ws attribute Hl Bs ACA insert $2l wer olleg Acy olen attribute Hi insert 52. = Aall, Gurett table a lA yoyo eattcll erste: Customer: Name | Society City Contact_no1 | Contact_no2 Emily [Nana Bazar | Anand 9879898798 | 7877855416 Jeniffer_| C.G.Road ‘Ahmedabad | 9825098254 co3__| Peter | M.G.Road__| Rajkot 9898787898 ‘Second Approach: = wet relation Hiell multi-value attribute Hel Actl primary key A remove Sél A AA Ds WAAL tall relation Hi 48 Wel multi-value attribute A etal relation ell primary key Het, = all, Guretl table A lA yor Eattell asta: 2 | Dept: CE ‘ADBMS (3340701) Prof. Vishal K. Makwana aD Darshan Unit 4 - Normalization Free of gg eh Optom Sr Customer: Customer_Contact: Cid [Name | Society city Cid__| Contact_no col [Emily [NanaBazer | Anand co1__ | 9879898798 02 [Jenifer [C.G.Road Ahmedabad || CO1 _| 7877855416 cos__| Peter _| M.G.Road Rajkot coz | 9825098254 cos | 9898787898, Second Normal Form (2NF) © Relation R, second normal form (2NF) Hi B Wx sél esle WA ANF Hl Ale Bel ES non-prime attribute W relation afl primary key U2 fully dependent Ala. OR © Relation R, second normal form (2NF) Hi B WH sl ats A A ine Hi Az WA AE Uel non-prime attribute 2 relation ofl primary key U2 partially dependent ot @l&. Example: Depositor_Account: [eid [ano [acess_date [balance [ bname + FF o GU? ati relation Hi 5 attribute cid, ano, acess_date, balance, bname UA 2FD WUAB. FD1: {cid,ano)>{acess_date, balance, bname} and FD2: ano~>{balance, bname} © cid Mal ano W primary key B. FD2 WALA balance Ua bname W Set ano UE WEL WA Bid UE a, o GU? oti relation Hi balance *e bname A primary key UR fully dependent ot2l. Uzd, UL attribute primary key U2 partially dependent &. Aell, GUz¢j relation 2NF Hi otal. Problem: © Gelszet AG, joint account Hi As Szctl LEU? customer A As ¥ AlHet account AA B. Wl AS joint account ‘A02’ Hi @ customer ‘CO2’ Mei ‘co3’ lat cl customer ‘CO2" Ue ‘C03 tuple Hi balance wel bname attribute Hi duplicate Acy A, Solution: © Original relation A decompose Ad A seat WA 3 Bell etal relation Hi partial FD ot Az. 3 | Dept: CE ‘ADBMS (3340701) Prof. Vishal K. Makwana aD Darshan Unit 4 - Normalization Free of gg eh Optom Sr © MLS ULB, Original relation Hiell partial dependent attribute $ B 2NF ofl condition A violet $2 B AS remove $2. Act steil relation HSL Wer Aefl AA B attribute U2 A fully dependent Aa ac ‘URL tell relation Hi Yl WA A Voll Uz fully dependent Az AA etait relation ofl primary key ott. © Original relation Hi Olle cits attribute AA % primary key WA WH w Vell al. o All, Guz oj table Depositor_Account @ Account *el Account_Holder table Hi decompose S2UlHi MLA BF oflA yoyo B: Account: Account_Holder: [Ano [balance | bname [sid Jano | acess_date | ft t | f © Al, Gia relation Account MA Account_Holder @ second normal form Hi &. Third Normal Form (3NF) * Relation R, third normal form (3NF) Hi & Ax sal esi el A 2NF Ala Wer AS Ue non-prime attribute ¥ transitively primary key U2 dependent ot €lz. © Attribute CQ attribute A U2 transitively dependent Aa WM Ai attribute BA Aa 3 ell: ADBandB>C. Exampl Account_Branch: ‘ano [balance | bname | baddress FDL t t t ror L___t © GU? ati relation Hi 4 attribute ano, balance, bname, baddress Mal Q FDS lA yo B: FD1: ano > {balance, bname, baddress} and FD2 : bname-> baddress co Adal, FD1 Wal FD2 Uzell transitivity a WEL BWLUA ano>baddress Ancll asta. © Aall, AH ano ell baddress transitively bname La HOB, PHI baddress A non-prime attribute 8. © ANI baddress & non-prime attribute 8 & primary key ano U2 transitively dependent &. o Aafl, Guz 4 relation 3NF Hi etell. Problem: ©. Transitively dependency & C(O data redundancy ele B, 4,| Dept: CE DBMS (3340701) Prof. Vishal K. Makwana aD Darshan Unit 4 - Normalization Free of gg eh Optom Sr © Wlrrelation Hi Ws % branch et E25 account Hi AULz branch address a Wz SAALHL WA BB ule woe ASB. Solution: © Original relation A Acl AA decompose 2 ¥ Pell cic relation Hi non-prime attribute A transitively primary key U2 dependent at Ala. © Wl Sdf HB transitively dependent attribute 3 B 3NF ofl condition A violet 8% B AA remove sal. AA otal relation Hi 48 AA non-prime attribute 3 ® attribute A CLA transitivity AS Aa AA uRL otcl relation Hi Yl Wal AA otcll relation afl primary key etl. © Original relation Hi {let tut attribute AA Y primary key WA DH ¥ Wal a. o Adel, Gureil table Account_Branch & Account WA Branch table Hi decompose S2AlLHi WA BF AD Yo B: Account: Branch: [ano balance bname | [bname baddress | | ___f © &4, Account Mat Branch relation Hi 58 transitive dependency tell. © Aall, 2 cial relation third normal form Hi B. 5 | Dept: CE ‘ADBMS (3340701) Prof. Vishal K. Makwana

You might also like