Escolar Documentos
Profissional Documentos
Cultura Documentos
Any relationship of an ER diagram can be converted into relations based on the type of the relationships between entity sets. We have the following relationship
types;
One-to-one
One-to-many
Many-to-one
Many-to-many
The result will be Redundant.For example, let us consider case 2, where many-to-one relationship is discussed. After converting into relation schema, we have the
following relation schemas.
http://www.exploredatabase.com/2014/04/reduction-of-relationship-set-into.html 1/3
11/5/2018 Advanced Database Management System - Tutorials and Notes: Reduction of Relationship set into relation schema
Customer (CNo, CName, Address, Phone, ACNo)
If we include the primary key of one entity set as foreign of other entity set like in the case of one-to-one, one-to-many, and many-to-one, then we would have the
following set of relation schemas for case 1.
Customer (CNo, CName, Address, Phone)
OR
Suppose we have many-to-many relationship between Customer and Account, i.e, one customer can have one or more accounts and one account can be held by
more than one customer jointly. Assume that, customer ‘C101’ have accounts ‘A101’ and ‘A102’, customer ‘C102’ have account ‘A103’, and customer ‘C103’ and
‘C104’ jointly have account ‘A104’.
A) Let us include the ACNo as foreign key in Customer relation. Observe the Customer table after conversion.
CNo CName Address Phone ACNo
C101 Kumar Chennai 9988554422 A101
C101 Kumar Chennai 9988554422 A102
C102 Steve Mumbai 9758632512 A103
C103 Arun Delhi 8956234512 A104
C104 Karthik Delhi 7898654523 A104
Figure 3 – Customer table after including the ACNo as foreign key
In figure 3, the customer details for ‘C101’ are repeated for 2 accounts ‘A101’, and ‘A102’.
B) Let us include the CNo as foreign key in Account relation. Observe the Account table after conversion.
http://www.exploredatabase.com/2014/04/reduction-of-relationship-set-into.html 2/3
11/5/2018 Advanced Database Management System - Tutorials and Notes: Reduction of Relationship set into relation schema
A104 30000 Chandni chowk C103
A104 30000 Chandni chowk C104
Figure 4 – Account table after including the CNo as foreign key
In figure 4, the account details for account ‘A104’ is repeated for customers ‘C103’, and ‘C104’.
In both A and B, it shows redundancy in the data stored.
C) Let us consider separate table for many-to-many relationship as given in the tables below;
CNo ACNo
C101 A101
C101 A102
C102 A103
C103 A104
C104 A104
Figure 5 – Relationship table Depositor
Figure 5 shows minimal redundancy which cannot be avoided.
http://www.exploredatabase.com/2014/04/reduction-of-relationship-set-into.html 3/3