Professional Documents
Culture Documents
CHAPTER 3: NORMALISATION
Database Systems
Objective
Define relation.
Recognize problems in relational data model.
Define normalization and the level of normalization.
Identify the step in normalization.
2
CHAPTER 3: NORMALISATION
Database Systems
(a) Anomalies
Anomalies - Errors or inconsistencies that may result when a user attempts to update
a table that contains redundant data.
Types of anomalies:
(i) Modification Anomalies
(ii) Insert Anomalies
(iii) Delete Anomalies
a) Update Anomalies
i) Modification Anomalies
STUDENT_COURSE
Student_ID Student_Name Address Course_Code Course_Name
The Problem :
3
CHAPTER 3: NORMALISATION
Database Systems
If we want to update Course_Name Computer Power 200 (Graphic & Multimedia) to Computer Power
200 (Graphic) from STUDENT_COURSE table, we have to update all the rows of all students who
take that course. The problem is we have to update more than once.
The Solution :
Therefore, to avoid this problem, we have to separate the STUDENT_COURSE table as follows :
STUDENT
Student_ID Student_Name Address Course_Code
COURSE
Course_Code Course_Name
ASDIM Associate Diploma in Interactive Multimedia
CGMP200 Computer Power 200 (Graphic )
CITP100 Computer power 100 (IT)
DIPCGR Diploma in Computer Graphic and Design
The process to update Course will occur once without affecting other records.
STUDENT_COURSE
Student_ID Student_name Address Course_Code Course_Name
4
CHAPTER 3: NORMALISATION
Database Systems
Information
Technology
The Problem :
If we want to insert a new Course_Code and Course_Name to the STUDENT_COURSE table, it is
necessary to enter no data (null) into the attribute for student (Student_ID, Student_Name, Address).
The problem is the primary key (Student_ID) cannot be null.
The Solution :
Therefore, to avoid this problem, we have to separate the STUDENT_COURSE table as follows :
STUDENT
Student_ID Student_Name Address Course_Cide
S0144 Hamizah Mohamed Jln. Kg. Gajah ASDIM
Redzwan
S0149 Amjadi Abd. Mubin Bandar Baru Bangi CGMP200
S0157 Nurazean Bt. Md. Sobri Tmn. Koperasi Polis CITP100
S0159 Aidil Akmar Hj. Ayob Tmn. Melawati CGMP200
S0035 Syed Ahmad Rizal B. Syed Jalan Puchong DIPCGR
Abdul Razak
COURSE
Course_Code Course_Name
ASDIM Associate Diploma in Interactive Multimedia
CGMP200 Computer Power 200 (Graphic)
CITP100 Computer power 100 (IT)
DIPCGR Diploma in Computer Graphic and Design
CGMP200 Diploma in Information Technology
Any insertion to the COURSE table will not affect to the primary key in STUDENT table.
STUDENT_COURSE
Student_ID Student_Name Address Course_Code Course_Name
5
CHAPTER 3: NORMALISATION
Database Systems
Design
S0035 Syed Ahmad Rizal B. Jalan Puchong CGMP200 Computer Power
Syed Abdul Razak 200 (Graphic and
Multimedia)
The Problem :
When the Student_ID S0035 is deleted from STUDENT_COURSE table, information about any
Course_Code DIPCGR related to that student will also be deleted. That means no other Course_Code
DIPCGR remains in the database.
The Solution :
Therefore, to avoid this problem, we have to separate the STUDENT_COURSE table as follows :
STUDENT
Student_ID Student_Name Address Course_Code
COURSE
Course_Code Course_Name
Any deletion from STUDENT table will not affect the data in COURSE table.
STUDENT_SUBJECT
Student_ Student_Name Address Subject_Cod Subject_Name Credit_Hours
ID
e
S0144 Hamizah Mohamed Jln. Kg. Gajah ACT410 Computerised 4
Redzwan Accounting
S0149 Amjadi Abd. Mubin Bandar Baru ADM101 Internet 4
6
CHAPTER 3: NORMALISATION
Database Systems
Bangi Publishing
S0157 Nurazean Bt. Md. Sobri Tmn. Koperasi ADM101 Internet 4
Polis Publishing
S0159 Aidil Akmar Hj. Ayob Tmn. Melawati ADM301 Project 4
S0035 Syed Ahmad Rizal B. Jalan Puchong ADM101 Internet 4
Syed Abdul Razak Publishing
The Problem :
In the STUDENT_SUBJECT table there is redundant information. It shows that the details of
subject ADM101 (Internet Publishing) are repeated for every member of Student_ID enrolled for
that subject.
The solution :
Therefore, to avoid this problem, we have to separate the STUDENT_SUBJECT table as follows:
It shows that the subject information appears only once for each
3.2 Penormalan (Normalisation) subject in SUBJECT relation & only the Subject_Code is
repeated in the STUDENT_SUBJECT relation.
3.2 Normalisation
Normalisation
7
CHAPTER 3: NORMALISATION
Database Systems
A process for assigning attributes into table and reduces data redundancy and helps eliminate the data
anomalies that associated with poor database design (unnormalised).
Level of Normalisation
8
CHAPTER 3: NORMALISATION
Database Systems
Identify Functional
Dependencies
Second Normal Form (2NF)
Remove Transitive
Third Normal Form (3NF) Dependencies
Example 1:
Steps in Normalisation
Table 1.1
Unnormalised Form (UNF)
STUDENT
Student ID Student Subject Name Subject Credit Grade Address Course Coordinator
Name Code Hours
S0001 Azlina Computerised ACT410 4 A Sentul Diploma in Fazilah
Ahmad Accounting Information
Internet
Repetitive
ADM101
group 4 B Technology
Publishing 4
Graphic
Attributes that DesignmoreART210
contains than one value in eachC and every line.
Application
S0144 Amirul Graphic ART310 4 A Shah Alam Diploma in Ahmad
Hamdan Communication Computer
Introduction to ART230 2 B Graphic
graphic Design Design
Business BUS210 4 B
Organization
The table above shows that Subject_name, Subject_code, Credit_hour and Grade fields which contains multiple
or more repeating values.
10
CHAPTER 3: NORMALISATION
Database Systems
Note 1.1:
Problems that occur in tables with repeating groups :
It’s hard to know exactly which Credit_Hour
belongs to which Subject_Name.
To find a record in the table is very difficult.
STUDENT
Student ID Student Subject Grade Address Course Coordinator
Name code
S0001 Azlina ACT410 A Sentul Diploma in Information Fazilah
Ahmad Technology
S0001 Azlina ADM101 B Sentul Diploma in Information Fazilah
Ahmad Technology
S0001 Azlina ART210 C Sentul Diploma in Information Fazilah
Ahmad Technology
S0144 Amirul ART310 A Shah Alam Diploma in Computer Ahmad
Hamdan Graphic Design
S0144 Amirul ART230 B Shah Alam Diploma in Computer Ahmad
Hamdan Graphic Design
S0144 Amirul BUS210 B Shah Alam Diploma in Computer Ahmad
Hamdan Graphic Design
S0151 Mazlina ART410 C Shah Alam Associate Diploma in Sahada
Yakub Interactive Multimedia
S0151 Mazlina ART 210 A Shah Alam Associate Diploma in Sahada
Yakub Interactive Multimedia
S0151 Mazlina BUS210 A Shah Alam Associate Diploma in Sahada
Yakub Interactive Multimedia
SUBJECT
Subject_Code Subject_Name Credit_hour
ACT410 Computerised Accounting 4
QDM101 Internet Publishing 4
ART210 Graphic Design Application 4
ART310 Graphic Communication 4
ART230 Introduction to graphic Design 2
BUS210 Business Organization. 4
ART410 Promotion Design 4
11
SUBJECT (Subject_code, Subject_name, Credit_hour)
CHAPTER 3: NORMALISATION
Database Systems
Note 1.2 :
What is Functional Dependencies?
Functional Dependencies describe relationships between attributes in a relation.
A relationship between attributes in which one attribute or group of attribute determines the value of another in
the same table.
Example :
Consider microcomputers in a COSMOPOINT computer lab. Each has only one size of main memory. So
MemorySize is functionally dependent on ComputerSerialNumber.
How to write?
ComputerSerialNumber MemorySize
The attributes on the left side of the arrow are called determinants.
How to read?
12
CHAPTER 3: NORMALISATION
Database Systems
Note 1.2 :
13
CHAPTER 3: NORMALISATION
Database Systems
Table 1.3
Second Normal Form (2NF)
STUDENT
Student_ID Student_name Address Course Coordinator
S0001 Azlina Ahmad Sentul Diploma in Information Technology Fazilah
S0144 Amirul Shah Diploma in Computer Graphic Design Ahmad
Hamdan Alam
S0151 Mazlina Yakub Shah Associate Diploma in Interactive Sahada
Alam Multimedia
STUDENT (Student_ID, Student_name, Address, Course, Coordinator)
SUBJECT
Subject_code Subject_name Credit_hour
ACT410 Computerised Accounting 4
QDM101 Internet Publishing 4
ART210 graphic Design Application 4
ART310 Graphic Communication 4
ART230 Introduction to graphic Design 2
BUS210 Business Organization. 4
ART410 Promotion Design 4
Subject (Subject_code, Subject_name, Credit_hour)
STUDENT_GRADE
Student_ID Subject_code Grade
S0001 ACT410 A
S0001 QDM101 B
S0001 ART210 C
S0144 ART310 A
S0144 ART230 B
S0144 BUS210 B
S0151 ART410 C
S0151 ART210 A
S0151 BUS210 A
STUDENT_GRADE (Student_ID, Subject14
_code, Grade)
CHAPTER 3: NORMALISATION
Database Systems
Note1.3:
Transitive Dependencies
15
CHAPTER 3: NORMALISATION
Database Systems
Note 1.3 :
Solution : In order to build 3NF table (relation), you have to remove the transitive dependencies.
Transitive Dependencies
Becomes
16
CHAPTER 3: NORMALISATION
Database Systems
17
CHAPTER 3: NORMALISATION
Database Systems
Table 1.4
STUDENT
Student_ID Student_name Address Course
S0001 Azlina Ahmad Sentul Diploma in Information Technology
S0144 Amirul Hamdan Shah Alam Diploma in Computer Graphic Design
S0151 Mazlina Yakub Shah Alam Associate Diploma in Interactive Multimedia
STUDENT (Student_ID, Student_name, Address,Course)
SUBJECT
Subject_code Subject_name Credit_hour
ACT410 Computerised Accounting, 4
ART310 Graphic Communication 4
ART410 Promotion Design 4
ART230 Introduction to graphic Design 2
BUS210 Business Organization 4
QDM101 Internet Publishing 4
ART210 Graphic Design Application 4
SUBJECT(Subject_code, Subject_name, Credit_hour)
COURSE
Course Coordinator
Diploma in Information Technology Fazilah
Diploma in Computer Graphic Design Ahmad
Associate Diploma in Interactive Multimedia Sahada
COURSE (Course, Coordinator)
STUDENT_GRADE
Student_ID Subject_code Grade
S0001 ACT410 A
S0001 ADM101 B
S0001 ART210 C
S0144 ART310 A
S0144 ART230 B
S0144 BUS210 B
S0151 ART410 C
S0151 ART 210 A
S0151 BUS210 A
18
CHAPTER 3: NORMALISATION
Database Systems
Example 2 :
Table 2.1 :
Unnormalised Table (UNF)
A101 Salmah Ampang HD200 Hard Disk 10 100 Seagate Pulau Pinang
Second Normal Form (2NF)
KB100 Keyboard 10 25 XYZ Ent Petaling Jaya
(refer table 2.3)
SP360 Speaker 5 45 XYZ Ent Petaling Jaya
Remove Transitive Dependencies
(refer note 2.3)
102 Rani Ampang MS112
Third Normal Mouse
Form (3NF) 4 15 XYZ Ent Petaling Jaya
(refer tableCP200
2.4) CPU 2 650 XYZ Ent Petaling Jaya
VG400 VGA Card 2 200 XYZ Ent Petaling Jaya
INVOICE (Customer_no, Customer_name, Address, Item_code, Item_desc, Qty, Price, Supplier, Supplier_address)
The table above shows that Item_code, Item_desc, Qty, Price, Supplier & Supplier_address fields contain
multiple or repeating values.
Assumption : One supplier supply many products.
19
CHAPTER 3: NORMALISATION
Database Systems
Table 2.2
First Normal Form (1NF)
CUSTOMER
Customer_no Customer_name Address
A100 Abu Sentul
Note 2.1:A101 Salmah Ampang
ProblemsA102
that occur in table with repeating Rani
groups Ampang
:
CUSTOMER (Customer_No,Customer_name,Address)
It’s hard to know exactly which Item_Code
belongs to which Item_Desc.
INVOICE
To find a record in the table is very difficult.
Customer_no Item_code Item_desc Qty Price Supplier Supplier_address
A100
How to handleKB100 Keyboard
Repeating Groups? 20 25 XYZ Ent. Petaling Jaya
A100
CP200 group can
The repeating CPU be handled10 by 650 XYZ Ent. Petaling Jaya
A100 separatingMS112
UnnormalisedMouse
Form (UNF)2 into 15 XYZ Ent. Petaling Jaya
First Normal Form (1NF) as shown later.
A101 HD200 Hard Disc 10 100 Seagate Pulau Pinang
A101 KB100 Keyboard 10 25 XYZ Ent. Petaling Jaya
A101 SP360 Speaker 5 45 XYZ Ent. Petaling Jaya
A102 MS112 Mouse 4 15 XYZ Ent. Petaling Jaya
A102 CP200 CP 2 200 XYZ Ent. Petaling Jaya
A102 VG400 VGA Card 2 650 XYZ Ent. Petaling Jaya
INVOICE (Customer_no, Item_code, item_desc, Qty, Price, Supplier, Supplier_address)
The table above shows that each row contains a single value.
20
CHAPTER 3: NORMALISATION
Database Systems
Note 2.2
Identify Functional Dependencies.
A relationship between attributes in which one attribute or group of attribute determines the value of another in
the same table.
21
CHAPTER 3: NORMALISATION
Database Systems
Table 2.3
CUSTOMER
Customer_no Customer_name Address
A100 Abu Sentul
A101 Salmah Ampang
A102 Rani Ampang
CUSTOMER (Customer_no, Customer_name, Address)
ITEM
Item_code Item_desc Price Supplier Supplier_Address
INVOICE
Customer_no Item_code Qty
A100 KB100 20
A100 CP200 10
A100 MS112 2
A101 HD200 10
A101 KB100 10
A101 SP360 5
A102 MS112 4
A102 CP200 22 2
A102 VG400 2
CHAPTER 3: NORMALISATION
Database Systems
Nota 2.3:
Transitive Dependency
A functional dependency between 2 or more non-key attributes. A condition in which an attribute is
dependent on another attributes that is not part of the primary key.
A relation is in Third Normal Form (3NF) if it is in 2NF and has no transitive dependency.
Non-primary key attribute is functionally dependent on another non-primary key attribute.
23
CHAPTER 3: NORMALISATION
Database Systems
Transitive Dependencies
Transitive Dependencies
24
CHAPTER 3: NORMALISATION
Database Systems
Solution: In order to build 3NF table (relation), you have to remove the transitive dependencies.
Transitive Dependencies
Becomes
25
CHAPTER 3: NORMALISATION
Database Systems
Table 2.4
Third Normal Form (3NF)
CUSTOMER
Customer_no Customer_name Address
A100 Abu Sentul
A101 Salmah Ampang
A102 Rani Ampang
CUSTOMER (Customer_no, Customer_name, Address)
Example 3 :
INVOICE
The Steps in Normalisation
Customer_no Item_code Qty
A100 KB100 20
A100 CP200 10
A100 MS112 2
A101 HD200 10
A101 SP360 5
A101 KB100 10
A102 MS112 4
A102 CP200 2
A102 VG400 2
INVOICE (Customer_no, Item_code, Qty)
ITEM
Item_code Item_desc Price Supplier
SUPPLIER
Supplier Supplier_address
26
CHAPTER 3: NORMALISATION
Database Systems
PROJECT
Remove Transitive Dependencies
Project_no Third normal Staff_no
Project_name form (3NF) Staff_name Job_classification
(refer note 3.3) Charge_hour Hour
(refer table 3.4)
1 DADD 00689 Samat Elect.Engineer RM 20 20
00500 Ali Web Developer RM 22 18
00444 Azie Web Developer RM 22 15
The above table shows fields (Staff_no, Staff_name, Job_classification, Charge_hour & Hour) which have
Repeating Values.
27
CHAPTER 3: NORMALISATION
Database Systems
Note 3.1:
Problems that occur in tables with repeating
groups :
Table 3.2
It’s hard to know exactly which Staff_no
First Normal Form (1NF)
belongs to which Staff_name.
To find a record in the table is very difficult.
PROJECT
Project_noHow to handle
Project_
RepeatingStaff_no
Groups? Staff_name Job_ Charge_ hour
name classification hour
The repeating groups can be handled by
1 DADD 00689 Samat Elect.Engineer RM 20 20
separating Unnormalised Form (UNF) into First
1 DADD 00500 Ali Web Developer RM 22 18
Normal Form (1NF) as shown later.
1 DADD 00444 Azie Web Developer RM 22 15
2 Programming 00123 Kamal System Analyst RM 25 30
2 Programming 00999 Hazlim Technical RM 16 56
Support
3 Multimedia 00689 Samat Elect.Engineer RM 20 40
3 Multimedia 00111 Anaz Programmer RM 18 35
The above table shows that each row has its own value.
28
CHAPTER 3: NORMALISATION
Database Systems
Note 3.2:
A relationship between attributes in which one attribute or group of attribute determines the value of another in
the same table.
Project_no Project_name
Staff_no Staff_name, Job_classification, Charge_hour
Staff_no, Project_no Hour
29
CHAPTER 3: NORMALISATION
Database Systems
Table 3.3 :
PROJECT
Project_no Project_name
1 DADD
2 Programming
3 Multimedia
PROJECT (Project_no, Project_name)
STAFF
Staff_no Staff_name Job_classification Charge_hour
HOUR
Staff_no Project_no Hour
00689 1 20
00500 1 18
00444 1 15
00123 2 30
00999 2 56
00689 3 40
00111 3 35
HOUR (Staff_no, Project_no, Hour)
30
CHAPTER 3: NORMALISATION
Database Systems
Note 3.3:
Transitive Dependency
A functional dependency between 2 or more non-key attributes. A condition in which an attribute is
dependent on another attribute that is not part of the primary key.
A relation is in Third Normal Form (3NF) if it is in 2NF and has no transitive dependency.
Non-primary key attribute is functionally dependent on another non-primary key attribute.
Project_no Project_name
Staff_no Staff_name, Job_classification, Charge_hour
Staff_no, Project_no Hour
31
CHAPTER 3: NORMALISATION
Database Systems
Transitive Dependencies
Solution: In order to build 3NF table (relation), you have to remove the transitive dependencies.
Transitive Dependencies
Becomes
Transitive Dependencies
Project_no Project_name
Staff_no, Project_no Hour
Staff_no Staff_name, Job_classification
32
CHAPTER 3: NORMALISATION
Database Systems
Table 3.4
Third Normal Form (3NF)
PROJECT
Project_no Project_name
1 DADD
2 Programming
3 Multimedia
PROJECT (Project_no, Project_name)
STAFF
Staff_no Staff_name Job_classification
HOUR
Staff_no Project_no Hour
00689 1 20
00500 1 18
00444 1 15
00123 2 30
00999 2 56
00689 3 40
00111 3 35
HOUR (Staff_no, Project_no, Hour)
JOB
Job_classification Charge_hour
Elect.Engineer RM 20
Web Developer RM 22
System Analyst RM 25
Technical Support RM 16 33
Programmer RM 18
JOB (Job_classification, Charge_hour)
CHAPTER 3: NORMALISATION
Database Systems
Example 4:
140 Alan Beeton Accounting 52000 103 Tax Acc 8 Dec 2003
110 Chris Lucera Info Systems 43000 101 SPSS 1 Dec 2003
104 C++ 14 Nov 2003
190 Lorenzo Davis Finance 55000
150 Susan Martin Marketing 42000 101 SPSS 16 Jun 2003
105 Java 12 Aug 2003
UNF
34
CHAPTER 3: NORMALISATION
Database Systems
STAFF
StaffID Name Dept Salary
100 Margaret Simpson Marketing 48000
110 Chris Lucera Info Systems 43000
140 Alan Beeton Accounting 52000
190 Lorenzo Davis Finance 55000
150 Susan Martin Marketing 42000
COURSE
StaffID CourseID CourseTitle EndDate
100 101 SPSS 19 Jul 2003
100 102 Surveys 10 Aug 2003
110 101 SPSS 1 Dec 2003
110 104 C++ 14 Nov 2003
140 103 Tax Acc 8 Dec 2003
190
150 101 SPSS 16 Jun 2003
150 105 Java 12 Aug 2003
Table in 1NF is the situation where the intersection of each row and column contains no repeating values (only
one value).
35
CHAPTER 3: NORMALISATION
Database Systems
A relationship between attributes in which one attribute or group of attribute determines the value of another in
the same table.
36
CHAPTER 3: NORMALISATION
Database Systems
STAFF
StaffID Name Dept Salary
100 Margaret Simpson Marketing 48000
110 Chris Lucera Info Systems 43000
140 Alan Beeton Accounting 52000
190 Lorenzo Davis Finance 55000
150 Susan Martin Marketing 42000
STAFF ( StaffID, Name, Dept, Salary)
STAFFCOURSE
StaffID CourseID EndDate
100 101 19 Jul 2003
100 102 10 Aug 2003
110 101 1 Dec 2003
110 104 14 Nov 2003
140 103 8 Dec 2003
190
150 101 16 Jun 2003
150 105 12 Aug 2003
COURSE (StaffID, CourseID, EndDate)
COURSE
CourseID CourseTitle
101 SPSS
102 Surveys
101 SPSS
104 C++
103 Tax Acc
101 SPSS
105 Java
COURSE (CourseID, CourseTitle)
Transitive Dependency
A functional dependency between 2 or more non-key attributes. A condition in which an attribute is
dependent on another attributes that is not part of the primary key.
A relation is in Third Normal Form (3NF) if it is in 2NF and has no transitive dependency.
Non-primary key attribute is functionally dependent on another non-primary key attribute.
CourseID CourseTitle
3NF are :
38
CHAPTER 3: NORMALISATION
Database Systems
Example 5:
Normalise the following form to Third Normal Form (3NF). You are required to show the normalisation steps
taken. Provide your answer in a relation scheme.
Solution:
The Steps in Normalisation:
Name the appropriate relation name.
List down all attributes involved.
39
CHAPTER 3: NORMALISATION
Database Systems
NZ SDN. BHD
RECEIPT OF HOUSE RENTAL PAYMENT
House_codeAddressStart_
Relation scheme in an Unnormalised Form :
dateEnd_dateRentalLandlord_code
Landlord
RENTAL (Tenant_code, Tenant_name, House_code, Address, Start_date, End_date, Rental, Landlord_code,
Landlord_name)
_namePG 3No. 6 Taman Tenaga, Kajang1/7/199531/7/1997RM 600T0069Intan bt.
JaafarPG 14No. 5 Taman Cahaya, Cheras1/8/19971/8/1999RM 650T8881Noor bt.
Nazri
b) First Normal Form (1NF)
Make sure there is no redundant data in relation.
Underline Primary Key.
CUSTOMER(Tenant_code, Tenant_name)
CUSTOMER(Tenant_code, Tenant_name)
Relation Name (Primary Key, Non-key Attributes)
CUSTOMER(Tenant_code, Tenant_name)
CUSTOMER(Tenant_code, Tenant_name)
Functional dependencies
RENTAL (Tenant_code, House_code, Start_date, End_date)
Transitive dependency
CUSTOMER(Tenant_code, Tenant_name)
41
CHAPTER 3: NORMALISATION
Database Systems
Example 6 :
Normalise the following form to Third Normal Form (3NF).
Solution:
The Steps in Normalisation:
Name the appropriate relation name.
KOLEJ MILENNIUM
List down all attributes involved. GRADE REPORT
SEMESTER MAY – AUGUST 2002
Relation Scheme Format:
Name : Emily Williams Major : MIS
Student No : 053-6929-24 Status : Senior
Address : 208 Brooks Hall
STUDENT (Name, StudentNo, Address, Major, Status, Subject Code, SubjectName, Professor, ProfDept, Grade,
Semester)
Transitive dependency
44
CHAPTER 3: NORMALISATION
Database Systems
Example 7 :
Normalise the following form to Third Normal Form (3NF).
AR SDN BHD
Solution: 32, JALAN KELANA,
The Steps in Normalisation: 50567 PETALING JAYA,
SELANGOR DARUL EHSAN
Name the appropriate relation name.
NO TEL : 03-7552525
List down all attributes involved.
CustomerNo
Relation Scheme: Format:
PNOO65 Invoice No : KS2345
Name : Ferhad Ibrahim Date : 2/3/2003
Address : Jalan Klang Lama
Tel No : 03 -2235990
INVOICE (InvoiceNo, Date, CustomerNo, Name, Address, TelNo, ProductCode, ProductName, PriceUnit, Quantity,
Discount, Subtotal)
46
ORDER (InvoiceNo, ProductCode, Quantity, Discount, Subtotal )
CHAPTER 3: NORMALISATION
Database Systems
Functional dependency
Transitive dependency
47
CHAPTER 3: NORMALISATION
Database Systems
Anomalies is an errors or inconsistencies that may result when a user attempts to update a table
that contains redundant data.
Normalization is a process for assigning attributes into table and reduces data redundancy and
helps eliminate the anomalies problems.
3 level of normalization :
1 NF
2 NF
3 NF
1 NF is a relation where the intersection of each row and column contains no repeating values.
48
CHAPTER 3: NORMALISATION
Database Systems
Steps in normalization :
Transitive dependencies are a condition where an attribute is depend on another attribute that is
not part of the primary key.
49
CHAPTER 3: NORMALISATION
Database Systems
Identify Functional
Dependencies
Second Normal Form (2NF)
Remove Transitive
Third Normal Form (3NF) Dependencies
50