327 views
2 votes
2 votes

How to calculate how many tables would be required for given ER diagram.

In most of the problems one-to-many,many-to-many relationships are stated in problem and number of tables has to be evaluated.

Please explain with one-two examples.

Question 1)

Let A and B be two entities in an E-R diagram with simple single valued attributes. R1 and R2 are two relationships between A and B, where R1 is one to many and R2 is many to many. R1 has 2 attributes and R2 has 3 attributes. What is the minimum number of tables required to represent this situation in the relational model?

Here answer given is 3 tables.HOW???

1 Answer

Best answer
1 votes
1 votes
In the given question, one relation will be required for A, one will be required for B and one will be required for representing R2.

See, the basic point here to look out for is:
- No extra tables are required for a one-to-many-relationship.

-One extra table is required for representing many-to-many relationship.

-One extra table is required for multi-valued relationship.

-Plus one table is required for representing each strong entity.

This way, you can identify the number of tables required for any ER model.
selected by

No related questions found