SlideShare a Scribd company logo
1 of 18
Normal forms & Normalization
 Proposed by Edgar F. Codd
 Integral part of Relational Databases
 Reduce redundancy & improve data
integrity
 Top down refinement process
 Relational design by analysis
First, Second & Third Normal Forms
1 NF
3 NF
2 NF
Definition :
Normalization is the process of analyzing relation schemas
based on their Functional Dependencies and Primary
Keys to achieve the desirable properties of :
 Minimizing redundancy
 Minimizing insertion, deletion & updation
anomalies.
Normal Form of a relation refers to the degree to which it
has been normalized.
Superkey
Key
Candidate keys
Primary Key
Prime and Non-prime attributes
SSN PNUMBER HOURS
First Normal form
 Only Atomic Values
 Disallow Multi-valued & Composite
Attributes
DEPARTMENT
DNAME DNUMBER MANAGER_ID DLOCATIONS
DNAME DNUMBER MANAGER_ID DNUMBER DLOCATIONS
Second normal form
• Full Functional Dependency
• A relation schema is in 2 NF if it is in 1 NF and if every
non-prime attribute is fully functionally dependent on the
Primary key.
SSN PNUMBER HOURS ENAME PNAME PLOCATION
{ SSN, PNUMBER } HOURS ……….. Full Functional Dependency
{ ENAME, PNAME, PLOCATION } all are partially dependent on the key.
Hence the above relation is not in 2 NF
SSN ENAME
PNUMBER PNAME
PNUMBER PLOCATION
SSN PNUMBER HOURS ENAME PNAME PLOCATION
SSN PNUMBER HOURS SSN ENAME PNUMBER PNAME PLOCATION
DEFINITION :
A relation schema is in 2 NF if it is in 1 NF and every non-
prime attribute is fully functionally dependent on the key.
A relation schema is in 2 NF if it is in 1 NF and every non-
prime attribute is not partially dependent on the key.
Third normal form
Transitive Dependency
In a relation schema R if there exist attributes X,Y,Z such
that :
X Y & Y Z, where Y is non-prime
Then, X Y is a transitive dependency through non-
prime attribute Y.
DEFINITION :
A relation schema is in 3 NF if
• it satisfies 2 NF and
• no non-prime attribute is transitively
dependent on the key.
SSN ENAME BDATE ADDRESS DNUMBER DNAME MGR_ID
SSN DNUMBER
DNUMBER MGR_ID
Therefore, SSN MGR_ID is a transitive dependency through
non-prime attribute DNUMBER
SSN ENAME BDATE ADDRESS DNUMBER
DNUMBER DNAME MGR_ID
&
Examples for practice
PROJ_ID PNAME PMGR_ID E_ID ENAME E_DEPT E_HRLY_RATE HOURS
PROJECT_EMPLOYEE
PROJ_ID PNAME PMGR_ID
PROJ_ID E_ID ENAME E_DEPT E_HRLY_RATE HOURS
PROJECT
PROJECT_EMPLOYEE
Now the relations are in 1NF.
{ ENAME, E_DEPT, E_HRLY_RATE } are partially dependent on the key { PROJ_ID, E_ID }
Therefore the relation is not in 2 NF
PROJ_ID PNAME PMGR_ID
PROJECT
E_ID ENAME E_DEPT E_HRLY_RATE
PROJ_ID E_ID HOURS
HOURS
Above relations are in 2 NF, but not in 3 NF.
E_ID E_DEPT, E_DEPT E_HRLY_RATE
So, E_ID E_HRLY_RATE is a transitive dependency.
E_ID ENAME E_DEPT E_DEPT E_HRLY_RATE
EMPLOYEE HOURLY_RATES
Q1) Consider the following relation :
CAR_SALE( CAR#, DATE_SOLD, SALESMAN#,
COMMISSION, DISCOUNT)
Additional functional dependencies are :
DATE_SOLD DISCOUNT
SALESMAN# COMMISSION
Based on the primary key, what is the highest normal form
of this relation. Normalize it to 3 NF.
Solution :
The relation is in 1NF.
It is not in 2 NF. As SALESMAN# COMMISSION
COMMISSION is partially dependent on the key { CAR#, SALESMAN#}
It is decomposed into two relations :
CAR_SALE(CAR#, DATE_SOLD, DISCOUNT, SALESMAN#)
SALES(SALESMAN#, COMMISSION)
These relations are in 2 NF but not in 3 NF.
CAR# DATE_SOLD, DATE_SOLD DISCOUNT
Further decomposition results :
CAR_SALE(CAR# , DATE_SOLD, SALESMAN#)
DATES(DATE_SOLD, DISCOUNT)
SALES(SALESMAN#, COMMISSION)
Q2) book(Title, author, type, price, author_affil, publisher)
Title type, publisher
Type price
Author author_affil
Solution :
Book(title, type, publisher, author)
Author(Author_name, author_affil)
Types(type, price)
Q3) Schedule(stud_id, class_no, sname, course, class_time, room_no, instructor)
stud_id sname, course
Class_no class_time, room_no, instructor
Solution :
Relation is in 1 NF but not in 2 NF due to partial dependency on the key.
Therefore it is decomposed into :
STUDENT(STUD_ID, SNAME, COURSE)
CLASS(CLASS_NO, CLSS_TIME, ROOM_NO, INSTRUCTOR)
STUD_CLASS(STUD_ID, CLASS_NO)
Q4) Transaction(Trans_ID, item_no, price, qty_sold, seller, seller_discount)
Trans_id seller
Trans_id, item_no qty_sold
Item_no price
Seller seller_discount
Solution :
TRANSCATION(TRANS_ID, ITEM_NO, QTY_SOLD)
ITEMS(ITEM_NO, PRICE)
SELLER(TRANS_ID, SELLER, SELLER_DISCOUNT)
Above relations are in 2 NF but not in 3 NF. Further decomposition of SELLER leads to :
SELLER1(TRANS_ID, SELLER)
SELLER2(SELLER, SELLER_DISCOUNT)

More Related Content

Similar to Normal forms & Normalization.pptx

Similar to Normal forms & Normalization.pptx (20)

8 normalization
8 normalization8 normalization
8 normalization
 
18.2.14
18.2.1418.2.14
18.2.14
 
Normalization
NormalizationNormalization
Normalization
 
Normalization
NormalizationNormalization
Normalization
 
chapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdfchapter 4-Functional Dependency and Normilization.pdf
chapter 4-Functional Dependency and Normilization.pdf
 
chapter_8.pptx
chapter_8.pptxchapter_8.pptx
chapter_8.pptx
 
DBMS lecture on Functional Dependency.pdf
DBMS lecture on Functional Dependency.pdfDBMS lecture on Functional Dependency.pdf
DBMS lecture on Functional Dependency.pdf
 
Normalization in DBMS
Normalization in DBMSNormalization in DBMS
Normalization in DBMS
 
Database Management System( Normalization)
Database Management System( Normalization)Database Management System( Normalization)
Database Management System( Normalization)
 
Normalization
NormalizationNormalization
Normalization
 
Database management system session 5
Database management system session 5Database management system session 5
Database management system session 5
 
Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)Database Systems - Normalization of Relations(Chapter 4/3)
Database Systems - Normalization of Relations(Chapter 4/3)
 
Normalization
NormalizationNormalization
Normalization
 
Normal forms.ppt
Normal forms.pptNormal forms.ppt
Normal forms.ppt
 
Chapter 9
Chapter 9Chapter 9
Chapter 9
 
Top schools in india
Top schools in indiaTop schools in india
Top schools in india
 
Function Dependencies and Normalization
 Function Dependencies and Normalization Function Dependencies and Normalization
Function Dependencies and Normalization
 
Normalization
NormalizationNormalization
Normalization
 
Chuẩn hóa CSDL
Chuẩn hóa CSDLChuẩn hóa CSDL
Chuẩn hóa CSDL
 
Database Presentation
Database PresentationDatabase Presentation
Database Presentation
 

Recently uploaded

原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证pwgnohujw
 
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证ppy8zfkfm
 
原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证pwgnohujw
 
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjSCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjadimosmejiaslendon
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...ThinkInnovation
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxStephen266013
 
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor NetworksSensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor NetworksBoston Institute of Analytics
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfgreat91
 
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...yulianti213969
 
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI  MANAJEMEN OF PENYAKIT TETANUS.pptMATERI  MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI MANAJEMEN OF PENYAKIT TETANUS.pptRachmaGhifari
 
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam DunksNOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam Dunksgmuir1066
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token PredictionNABLAS株式会社
 
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证ju0dztxtn
 
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证dq9vz1isj
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...yulianti213969
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024patrickdtherriault
 
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证a8om7o51
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives23050636
 
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一fztigerwe
 

Recently uploaded (20)

原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
原件一样(UWO毕业证书)西安大略大学毕业证成绩单留信学历认证
 
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
1:1原版定制利物浦大学毕业证(Liverpool毕业证)成绩单学位证书留信学历认证
 
原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证原件一样伦敦国王学院毕业证成绩单留信学历认证
原件一样伦敦国王学院毕业证成绩单留信学历认证
 
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarjSCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
SCI8-Q4-MOD11.pdfwrwujrrjfaajerjrajrrarj
 
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
Identify Rules that Predict Patient’s Heart Disease - An Application of Decis...
 
Audience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptxAudience Researchndfhcvnfgvgbhujhgfv.pptx
Audience Researchndfhcvnfgvgbhujhgfv.pptx
 
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor NetworksSensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
Sensing the Future: Anomaly Detection and Event Prediction in Sensor Networks
 
edited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdfedited gordis ebook sixth edition david d.pdf
edited gordis ebook sixth edition david d.pdf
 
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
obat aborsi Bontang wa 081336238223 jual obat aborsi cytotec asli di Bontang6...
 
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI  MANAJEMEN OF PENYAKIT TETANUS.pptMATERI  MANAJEMEN OF PENYAKIT TETANUS.ppt
MATERI MANAJEMEN OF PENYAKIT TETANUS.ppt
 
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam DunksNOAM AAUG Adobe Summit 2024: Summit Slam Dunks
NOAM AAUG Adobe Summit 2024: Summit Slam Dunks
 
社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction社内勉強会資料_Object Recognition as Next Token Prediction
社内勉強会資料_Object Recognition as Next Token Prediction
 
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
如何办理英国卡迪夫大学毕业证(Cardiff毕业证书)成绩单留信学历认证
 
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotecAbortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
Abortion pills in Riyadh Saudi Arabia (+966572737505 buy cytotec
 
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
1:1原版定制伦敦政治经济学院毕业证(LSE毕业证)成绩单学位证书留信学历认证
 
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
obat aborsi Tarakan wa 081336238223 jual obat aborsi cytotec asli di Tarakan9...
 
Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024Northern New England Tableau User Group (TUG) May 2024
Northern New England Tableau User Group (TUG) May 2024
 
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
如何办理加州大学伯克利分校毕业证(UCB毕业证)成绩单留信学历认证
 
Displacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second DerivativesDisplacement, Velocity, Acceleration, and Second Derivatives
Displacement, Velocity, Acceleration, and Second Derivatives
 
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
如何办理哥伦比亚大学毕业证(Columbia毕业证)成绩单原版一比一
 

Normal forms & Normalization.pptx

  • 1. Normal forms & Normalization  Proposed by Edgar F. Codd  Integral part of Relational Databases  Reduce redundancy & improve data integrity  Top down refinement process  Relational design by analysis
  • 2. First, Second & Third Normal Forms 1 NF 3 NF 2 NF
  • 3. Definition : Normalization is the process of analyzing relation schemas based on their Functional Dependencies and Primary Keys to achieve the desirable properties of :  Minimizing redundancy  Minimizing insertion, deletion & updation anomalies. Normal Form of a relation refers to the degree to which it has been normalized.
  • 4. Superkey Key Candidate keys Primary Key Prime and Non-prime attributes SSN PNUMBER HOURS
  • 5. First Normal form  Only Atomic Values  Disallow Multi-valued & Composite Attributes DEPARTMENT DNAME DNUMBER MANAGER_ID DLOCATIONS DNAME DNUMBER MANAGER_ID DNUMBER DLOCATIONS
  • 6. Second normal form • Full Functional Dependency • A relation schema is in 2 NF if it is in 1 NF and if every non-prime attribute is fully functionally dependent on the Primary key. SSN PNUMBER HOURS ENAME PNAME PLOCATION { SSN, PNUMBER } HOURS ……….. Full Functional Dependency { ENAME, PNAME, PLOCATION } all are partially dependent on the key. Hence the above relation is not in 2 NF
  • 7. SSN ENAME PNUMBER PNAME PNUMBER PLOCATION SSN PNUMBER HOURS ENAME PNAME PLOCATION SSN PNUMBER HOURS SSN ENAME PNUMBER PNAME PLOCATION
  • 8. DEFINITION : A relation schema is in 2 NF if it is in 1 NF and every non- prime attribute is fully functionally dependent on the key. A relation schema is in 2 NF if it is in 1 NF and every non- prime attribute is not partially dependent on the key.
  • 9. Third normal form Transitive Dependency In a relation schema R if there exist attributes X,Y,Z such that : X Y & Y Z, where Y is non-prime Then, X Y is a transitive dependency through non- prime attribute Y.
  • 10. DEFINITION : A relation schema is in 3 NF if • it satisfies 2 NF and • no non-prime attribute is transitively dependent on the key.
  • 11. SSN ENAME BDATE ADDRESS DNUMBER DNAME MGR_ID SSN DNUMBER DNUMBER MGR_ID Therefore, SSN MGR_ID is a transitive dependency through non-prime attribute DNUMBER SSN ENAME BDATE ADDRESS DNUMBER DNUMBER DNAME MGR_ID &
  • 12. Examples for practice PROJ_ID PNAME PMGR_ID E_ID ENAME E_DEPT E_HRLY_RATE HOURS PROJECT_EMPLOYEE PROJ_ID PNAME PMGR_ID PROJ_ID E_ID ENAME E_DEPT E_HRLY_RATE HOURS PROJECT PROJECT_EMPLOYEE Now the relations are in 1NF. { ENAME, E_DEPT, E_HRLY_RATE } are partially dependent on the key { PROJ_ID, E_ID } Therefore the relation is not in 2 NF
  • 13. PROJ_ID PNAME PMGR_ID PROJECT E_ID ENAME E_DEPT E_HRLY_RATE PROJ_ID E_ID HOURS HOURS Above relations are in 2 NF, but not in 3 NF. E_ID E_DEPT, E_DEPT E_HRLY_RATE So, E_ID E_HRLY_RATE is a transitive dependency. E_ID ENAME E_DEPT E_DEPT E_HRLY_RATE EMPLOYEE HOURLY_RATES
  • 14. Q1) Consider the following relation : CAR_SALE( CAR#, DATE_SOLD, SALESMAN#, COMMISSION, DISCOUNT) Additional functional dependencies are : DATE_SOLD DISCOUNT SALESMAN# COMMISSION Based on the primary key, what is the highest normal form of this relation. Normalize it to 3 NF.
  • 15. Solution : The relation is in 1NF. It is not in 2 NF. As SALESMAN# COMMISSION COMMISSION is partially dependent on the key { CAR#, SALESMAN#} It is decomposed into two relations : CAR_SALE(CAR#, DATE_SOLD, DISCOUNT, SALESMAN#) SALES(SALESMAN#, COMMISSION) These relations are in 2 NF but not in 3 NF. CAR# DATE_SOLD, DATE_SOLD DISCOUNT Further decomposition results : CAR_SALE(CAR# , DATE_SOLD, SALESMAN#) DATES(DATE_SOLD, DISCOUNT) SALES(SALESMAN#, COMMISSION)
  • 16. Q2) book(Title, author, type, price, author_affil, publisher) Title type, publisher Type price Author author_affil Solution : Book(title, type, publisher, author) Author(Author_name, author_affil) Types(type, price)
  • 17. Q3) Schedule(stud_id, class_no, sname, course, class_time, room_no, instructor) stud_id sname, course Class_no class_time, room_no, instructor Solution : Relation is in 1 NF but not in 2 NF due to partial dependency on the key. Therefore it is decomposed into : STUDENT(STUD_ID, SNAME, COURSE) CLASS(CLASS_NO, CLSS_TIME, ROOM_NO, INSTRUCTOR) STUD_CLASS(STUD_ID, CLASS_NO)
  • 18. Q4) Transaction(Trans_ID, item_no, price, qty_sold, seller, seller_discount) Trans_id seller Trans_id, item_no qty_sold Item_no price Seller seller_discount Solution : TRANSCATION(TRANS_ID, ITEM_NO, QTY_SOLD) ITEMS(ITEM_NO, PRICE) SELLER(TRANS_ID, SELLER, SELLER_DISCOUNT) Above relations are in 2 NF but not in 3 NF. Further decomposition of SELLER leads to : SELLER1(TRANS_ID, SELLER) SELLER2(SELLER, SELLER_DISCOUNT)