Cardinality Constraint
Tell as maximum number of relationship instances in which the entity(tuple) can participate, this is noting but Cardinality Constraint In DBMS.
There are two types of cardinality constraint
- Cardinality Ratios/Mapping Constraint
- Participation Contraints
Cardinality Ratios/Mapping Constraint
Participation Constraints - Link
1. Many-to-Many Cardinality
- A tuple in Table A associated with any number of tuples in Table B.
- A tuple in Table B is associated with any number of tuples in Table A.
- Students can enrol on any number of courses.
- The course can be enrolled by any number of students.
2. Many-to-One Cardinality
- A tuple in Table A associated with only one tuple in Table B.
- A tuple in Table B is associated with any number of tuples in Table A.
- One student(tuple) can enrol in at most one course.
- One course(tuple) can be enrolled by many students.
3. One-to-Many Cardinality
- A tuple in Table A associated with any number of tuples in Table B.
- A tuple in Table B is associated with only one tuple in Table A.
- Student can enroll on any number of courses.
- The course can be enrolled by only one student.
4. One-to-One Cardinality
- A tuple in Table A associated with only one tuple in Table B.
- A tuple in Table B is associated with only one tuple in Table A.
- One student can enrol in one course.
- One course(tuple) can be enrolled by at most one student(tuple).
0 Comments