I've been looking everywhere but I couldn't find the difference between table relationships and multiplicities.
What's the main difference seeing that both of them can be one-many, many-one, and etc. The only difference I noticed so far is that multiplicities are depicted in 1..* format, or am I wrong?
If we have a table User and User can own multiple Blogs, what's the relationship here and what's the multiplicity?
The two notations are related, but not the same.
The 1..*
, 0..*
etcetera represent the multiplicity of one end of a relationship. One-to-many is actually describing the multiplicities of both ends of a relationship; i.e "one-to-many" means 1..1
(or maybe 0..1
) at one end and 1..*
(or maybe 0..*
) at the other end.
And as, you can see, multiplicity notation allows you to express optional versus mandatory relationships ... which "one-to-many" doesn't cover.
If we have a table User and User can own multiple Blogs, what's the relationship here and what's the multiplicity?
That would be described as one-to-many, but in UML you would express the relationship like this:
BlogAuthorship
-------- 1..1 0..* --------
| User | <--------------------> | Blog |
-------- --------
which is also saying that:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With