in Databases
532 views
0 votes
0 votes
How many minimum number of tables required to represent a Department entity  which having two multi valued attributes phone and office?
in Databases
532 views

2 Comments

are you having only two attributes or any other attribute is present other than multivalued?
1
1
Yes there are some more attributes are present
0
0

2 Answers

1 vote
1 vote

There will be total 3 three tables, because each MV needs separate table which contains PK + MVA.

Basic rule is to uniquely identify/ select any attribute when requested from database. If we put MVA into single table like

person_ID fav_colors age
person_1 Red, Blue 20
R2D2 Black 22

In the above table, fav_colors are the multivalued attributes.The problem with doing it is that it is now difficult (but possible) to search the table for any particular fav_color that a person might have. 

Multivalued attributes need a separate table so in my example we have only one Multivalued attribute(fav_colors).

Colors

person_ID fav_colors
person_1 Red
person_1 Blue
R2D2 Black

 

So, in your case it will be T1(dept_ID, A, B, C), T2(dept_ID, phone), T3(dept_ID, office)

Total 3 tables.  

0 votes
0 votes

Since there are some more attributes other than multivalued attributes, 2 tables are required.

First table will contain the primary key and the attributes other than multivalued attributes and the second table will contain the primary key and multivalued attributes.

2 Comments

Each MVA needs separate table....Table 2 will be further gets split into (Dno,Phone) and (Dno, office)
1
1
total 3 tables
0
0