Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am trying to get understanding of ER diagrams and I kind of understand most of the concepts like crow foot notations and cardinality but I have one doubt and I am not finding answer to it.
How does the cardinality affects the number of rows in two tables . for example is to okay to say that If table A and table B have 1:M cardinality then table B must always have more number of rows than A. I am trying to understand the ER models in depth. Please refer any books/material which has scenario based ER diagrams MCQs .
Thanks,
Neha
There are a number of different notations for ERD diagrams. 1:M usually means each record in the left table (the 1) has 0 or more records in the right table (the M). But depending on the ERD notation used it could also mean 1 or more instead of 0 or more. In both cases it does not mean that table B must always have more records than table A. with M being 0 or larger table B could have less records than table A. With M being 1 or larger table B could have the same number of records as table A.
Perhaps this article helps: Entity Relationship Diagram - Common ERD Symbols and Notations
I would say table B can have more number of rows than A.
An instance of your model may show only as much rows in table B as in table A.
For example, you can model Customer to Orders using a 1:n relation.
But for a specific instance, there might be only customers with exactely one order.
Thanks for the response Swuehl. It makes sense.
Would you be able to suggest any books for ER diagrams study and interpretation practice case studies?
There are a number of different notations for ERD diagrams. 1:M usually means each record in the left table (the 1) has 0 or more records in the right table (the M). But depending on the ERD notation used it could also mean 1 or more instead of 0 or more. In both cases it does not mean that table B must always have more records than table A. with M being 0 or larger table B could have less records than table A. With M being 1 or larger table B could have the same number of records as table A.
Perhaps this article helps: Entity Relationship Diagram - Common ERD Symbols and Notations
Thanks for the clarification, Gysbert. The link you shared is quite informative.