In database design what do n:m and 1:n mean?
Does it have anything to do with keys or relationships?
In database design what do n:m and 1:n mean?
Does it have anything to do with keys or relationships?
What does the letter 'N' on a relationship line in an Entity Relationship diagram mean? Any number
M:N
M - ordinality - describes the minimum (ordinal vs mandatory)
N - cardinality - describes the miximum
1:N (n=0,1,2,3...) one to zero or more
M:N (m and n=0,1,2,3...) zero or more to zero or more (many to many)
1:1 one to one
Find more here: https://www.smartdraw.com/entity-relationship-diagram/
Imagine you have have a Book model and a Page model,
1:N means:
One book can have **many** pages. One page can only be in **one** book.
N:N means:
One book can have **many** pages. And one page can be in **many** books.