Narrative of Database Requirements ER Modelling and Logical Design List of Attributes To Be Stored
Narrative of Database Requirements ER Modelling and Logical Design List of Attributes To Be Stored
INTRODUCTION TO NORMALIZATION
FILM
Introduction
Functional dependency
First normal form
Second normal form
Reference:
Introduction
Each order is placed with one supplier and has a unique serial
number... ZZZ002
Definition
Invoice Invoice , Invoice no, Delivery address, A table is in first normal form (1NF) if the intersection of each
no date Goods, VAT,Total, Invoice to row with each column contains exactly one value.
Description Cost All occurrences of a record type must contain the same
number of facts
Invoice no, Description Quantity
Methods for bringing a table into 1NF:
1.‘flattening the table’: create new rows for the repeating data,
filling in the created blank spaces by copying the non repeating
data
2. place repeating data with a copy of key attributes into new table
QUALIFICATION
FIRST NORMAL FORM
All occurrences of a record type must contain the same number of facts Emp_id Qualification Date
EMPLOYEE_QUALIFICATIONS
Emp_id Emp name Qualification Date 090123 B.Sc. 27-Jun-09
123211 M.A. 23-Apr-00
090123 Green B.Sc. 27-Jun-09
123211 James M.A.,M.Sc. 23-Apr-00,27-Jun-09 123211 M.Sc. 27-Jun-09
343242 Smith B.Sc. 03-Oct-05 343242 B.Sc. 03-Oct-05
NORMALISATION: EMPLOYEE
Either make sure each record contains the same number of facts by adding Emp_id Emp name
new records-
EMPLOYEE_QUALIFICATIONS 090123 Green
Emp_id Emp name Qualification Date 123211 James
343242 Smith
090123 Green B.Sc. 27-Jun-09
123211 James M.A. 23-Apr-00
123211 James M.Sc. 27-Jun-09
343242 Smith B.Sc. 03-Oct-05
“non-key attribute”
PART_WAREHOUSE
An attribute not contained in any candidate key.
Part Warehouse Quantity Warehouse Address
P1 GLA NTH 300 Saracen Street, Glasgow
“candidate key” P2 GLA STH 20 Saracen Street, Glasgow
Any key of the relation (including the primary key). P1 GLA STH 300 Saracen Street Glasgow
P1 EDI 500 Baltic Street, Edinburgh
P3 EDI 500 Baltic Street, Edinburgh
P1 LEE 500 Carlisle Street, Leeds
SECOND NORMAL FORM
Warehouse address is repeated
Definition Change of address of Glasgow Warehouse requires all addresses to be changed
Possible inconsistencies after change of address
A table is in 2NF if it is in 1NF and every non-key attribute is
Warehouse has to store parts in order to preserve its address.
fully functionally dependant on any candidate key.
Part, Warehouse Quantity
Warehouse Warehouse_address
Functional dependency