@srestha please see this.
Could we have done it like this:
Table for E4
Table for E1
A |
B |
C |
a1 |
b1 |
c2 |
a2 |
b1 |
c1 |
a3 |
b2 |
c2 |
a4 |
b4 |
c4 |
Table for E3
We could combine E1, E4,E3 ->represent the relations R5 and R4
Let us name the table E'
A |
B |
C |
K |
L |
F |
G |
a1 |
b1 |
c2 |
k1 |
l1 |
f1 |
g1 |
a2 |
b1 |
c1 |
null |
null |
null |
null |
a3 |
b2 |
c2 |
k2 |
l2 |
f2 |
g2 |
a4 |
b4 |
c4 |
k3 |
l1 |
null |
null |
Table for E5:
H |
I |
J |
A(foreign key to E'(A)for the relation R6 ) |
h1 |
i1 |
j1 |
a1 |
h2 |
i2 |
j1 |
a1 |
h3 |
i2 |
j2 |
a3 |
Similarly, we will have a table for E2 which could have a foreign key A to E'(A) for the relation R3
We need to have the table E''(D1, D2) D1, D2 are foreign key from E2. for the recursive relation R2.
E'''(AD) A is foreign key from E'(A,B,C,K,L,F,G) and D is foreign key from E2 we had to create E' for the many to many relation R1.
So in total wee will have E'''(AD), E''(D1, D2),E2,E5,E'(A,B,C,K,L,F,G)
So total 5 tables .