Normalization in Relational DBMS Systems #6

First Normal Form:All table columns should have distinct meaningIn another word: All attributes of an entity/table must be uniqueSolution: Grow the table row wise[in the direction of rows] not the column wiseGroup the columns with same meaning into oneTo handle multiple values for the same attribute of an entity create multiple rows [not multiple columns]To keep track of paycheques, you may think the table should be as follows:Name, provider company, date 1, pay cheque 1, date2 , pay cheque 2, date 3, paycheque 3See date1, date2, and date 3 have the same meaningPay cheque 1, Pay cheque 2, and Pay cheque 3 have the same meaningThese are the repeating attributesSolution:create table with:number name, company, date,   paycheque100    1,    xyz,      12/13,  1000.00100    1,    abc,      12/13,  1000.00100    1,    xyz,      12/31,  1000.00or create a child entity with Date and amount. And a master entity with number, Name and CompanyEntity one: number, name, companyEntity two: number, date, amount2nd Normal form:----------------Rule: All attributes can be identified from the primary key. Primary key is directly related to all other attributes.All attributes are fully dependent on the primary key.Line Item Table/Entity:--------------------number [line item] [pk]order number[pk]vendor namevendor townproduct codeproduct amountHere, vendor name and vendor town may not be fully dependent on the whole primary key. They are dependent on the order number.So we can decompose it into another table.Order entityNumber [pk]Vendor NameVendor TownLineitem entitynumber [pk]order_number [pk]product codeproduct amount3rd normal form-----------------Rule: Non key attributes are fully dependent on the primary key but not on any other key or attribute.In Order entity table, vendor town is not fully dependent on number[pk], but it does depend on the vendor name. So we can decompose order entity table into twoVendor EntityName [pk]TownOrder EntityNumbervendor-name

From: http://sitestree.com/?p=4761
Categories:6
Tags:
Post Data:2013-04-30 16:31:25

    Shop Online: <a href='https://www.ShopForSoul.com/' target='new' rel="noopener">https://www.ShopForSoul.com/</a>
    (Big Data, Cloud, Security, Machine Learning): Courses: <a href='http://Training.SitesTree.com' target='new' rel="noopener"> http://Training.SitesTree.com</a> 
    In Bengali: <a href='http://Bangla.SaLearningSchool.com' target='new' rel="noopener">http://Bangla.SaLearningSchool.com</a>
    <a href='http://SitesTree.com' target='new' rel="noopener">http://SitesTree.com</a>
    8112223 Canada Inc./JustEtc: <a href='http://JustEtc.net' target='new' rel="noopener">http://JustEtc.net (Software/Web/Mobile/Big-Data/Machine Learning) </a>
    Shop Online: <a href='https://www.ShopForSoul.com'> https://www.ShopForSoul.com/</a>
    Medium: <a href='https://medium.com/@SayedAhmedCanada' target='new' rel="noopener"> https://medium.com/@SayedAhmedCanada </a>