Reputation: 17026
I am not talking about NHibernate.
I am talking about ER Model.
In the discussion of Database Design, what is the difference between many-to-one and one-to-many cardinality ratio?
Please give me two separate examples.
Upvotes: 0
Views: 218
Reputation: 22177
Upvotes: 1
Reputation: 25534
No difference at all. It's just two different ways of describing the same concept.
Upvotes: 1
Reputation: 5474
Wikipedia says "In SQL (Structured Query Language), the term cardinality refers to the uniqueness of data values contained in a particular column (attribute) of a database table."...
one to one and one to many refer to this uniqueness between 2 tables... one to many refers to tableA having 1 record that relates to many records in tableB. An example of this would be TableA (persons) holding a set of unique person records...For any particular person you can have many different phone numbers, so tableB (phones) could have "many" phone numbers for a single person record.
many to one refers to TableA having many records that relate to a single record in TableB. An example of this would be TableA (employee) holding many records of employees that relate to a single record in TableB (worklocation) containing an address of a particular building where some of these employees work.
Upvotes: 0