Relational Database Management System (RDMS)
Relational Database Management System (RDMS)
MANAGEMENT
SYSTEM(RDMS)
Integrity Constraints
Primary Key
Foreign Key
NORMALIZATION
• Normalization - process of removing data
redundancy by decomposing relations in a
Database.
S1 20 London P1 300
S1 20 London P2 200
S1 20 London P3 400
S1 20 London P4 200
S1 20 London P5 100
S1 20 London P6 100
S2 10 Paris P1 300
S2 10 Paris P2 400
S3 10 Paris P2 200
S4 20 London P2 200
S4 20 London P4 300
S4 20 London P5 400
Functional Dependency
Given a relation R, attribute Y of R is
functionally dependent on attribute X if and
only if each X-value in R has associated
with it precisely one Y-value in R (at any
one time)
Second Normal Form
A relation R is in Second Normal Form (2
NF) if it is in the 1NF and every non key
attribute is full functionally dependent on
the primary key.
Third Normal Form
6 lawrence Tina
PG4 1-Sep-99 10-Jun-00 350 CO40 Murphy
St,Glasgow
Tony
Aline 2 Manor Rd,
CR56 PG36 10-Oct-00 1-Dec-01 370 CO93 Shaw
Stewart Glasgow
Tony
5 Novar Dr, Shaw
PG16 1-Nov-02 1-Aug-03 450 CO93
Glasgow
Client (clientNo,
With the second approach, cName) the repeating group
we remove
PropertyRentalOwner (clientNo, propertyNo, pAddress, rentStart,
(property rented details) by placing the repeating data along with
rentFinish, rent, ownerNo, oName)
aClientNo
copy ofcName
the original key attribute (clientNo) in a separte relation.
CR76 John Kay
CR56 Aline Stewart
After
Clientremoving the partial dependencies,
(clientNo, cName) the creation of the three
new relations called
Rental Client, Rental,
(clientNo, and PropertyOwner
propertyNo, rentStart, rentFinish)
PropertyOwner (propertyNo, pAddress, rent, ownerNo, oName)
Client Rental
ClientNo cName ClientNo propertyNo rentStart rentFinish
CR76 John Kay CR76 PG4 1-Jul-00 31-Aug-01
CR56 Aline Stewart CR76 PG16 1-Sep-02 1-Sep-02
CR56 PG4 1-Sep-99 10-Jun-00
CR56 PG36 10-Oct-00 1-Dec-01
CR56 PG16 1-Nov-02 1-Aug-03
PropertyOwner
Transitive dependency
A condition where A, B, and C are attributes of a relation such that
if A B and B C, then C is transitively dependent on A via B
(provided that A is not functionally dependent on B or C).
Third normal form (3NF)
A relation that is in first and second normal form, and in which
no non-primary-key attribute is transitively dependent on the
primary key.
Client
fd2 clientNo cName (Primary Key)
Rental
fd1 clientNo, propertyNo rentStart, rentFinish (Primary Key)
fd5 clientNo, rentStart propertyNo, rentFinish (Candidate key)
fd6 propertyNo, rentStart clientNo, rentFinish (Candidate key)
PropertyOwner
fd3 propertyNo pAddress, rent, ownerNo, oName (Primary Key)
fd4 ownerNo oName (Transitive Dependency)
3NF ClientRental relation
Client Rental
PropertyOwner Owner
THANKS . . .