Search code examples
databasedatabase-designentity-relationshipmodelingcardinality

What is the purpose of data modeling cardinality?


I understand what cardinality is, so please don't explain that ;-)

I would like to know, what the purpose of doing cardinality is in data modeling, and why i should care.

Example: In an ER model you make relations and ad the cardinality to the relations. When am i going to use the cardinality further in the development process? Why should i care about the cardinality?

How, when and where do i use the cardinalities after i finish an ER model for example.

Thanks :-)


Solution

  • Cardinalities tell you something important about table design. A 1:m relationship requires a foreign key column in the child table pointing back to the parent primary key column. A many-to-many relationship means a JOIN table with foreign keys pointing back to the two participants.