In: Computer Science
By considering a relationship with (0, N) - (0, N) cardinalities between two entities, discuss the following:
Solution:
Cardinality of (0,N) -(0,N) between the two Enities is modeled below:
Cardinality(0,N) Denotes Zero or More
For Example consider two Entities in a Conceptual model of a college/school information system:
1.Teacher: Teacher ID(PK),Name, Address, Experience,Qualification,specialization,CourseID(FK) Taughts, Salary,Dept Id(FK),email, Phone no.
2..Course : Course ID(PK),Name,TeacherID(FK), DeptID(FK),Year,Sem,Major,No of modules
The Cardinality between Teacher Vs Course is (0,N)
ie A Teacher can Teach Zero or Many Courses in a College Infirmation system
and A Course is Taught by at least one to Many Teachers in the college information system
Another Example:
Customer --> Item Cardinality is (0,N)
Customer may buy Zero or more items at any time during shopping (Grocessory Market/ other malls)
At the same time An Item may buy zero to many Customers.
so Item -->Customer Cardinality is (0,N)
This Relation ship is useful to model the relation ships of entities with optional multiplicity properties from null to many.In certain cases , an item may not buy any one or buy many customers .
A customer may not buy any item during a visit to shop or may buy more items of various types it is optional.
This Rule will be varried when minimum cardinality is changed to 1. just like in the first Example A course must taught atl least one Teacher then many Teachers can teach same course of different modules.
This relationship will be implemented to satisfy the 3rd NF by eliminating Many to many (N-N) relation.