Description:
When I create a Relationship between two Entities, the cardinality shows as Zero or One, but I need to have Zero, One or More; how can I do that?
Solution:
If you create a Relationship from an Entity containing a Primary Key (PK) to an Entity that does not have its own PK, the cardinality automatically is set to 'Zero or One'. This is because no PK exists in the Child Entity and the PK needs to be Unique so cannot have more than one value.. However, when you add a PK to the Child Entity the cardinality automatically becomes 'Zero, One or More' as the Child Entity now has a composite PK and the combination needs to be unique, not each and every member of the PK.
The Cardinality can be changed and the default settings are based on common scenarios. Also, these are for documentation and reference purposes only and are not used in any syntax. So, one needs to think about which cardinality value will best suit their scenario.
Comments
0 comments
Please sign in to leave a comment.