In relation to data modeling and ERD design, explain comprehensively what is meant by the term cardinality (1 mark). In relation to this same issue, how do we represent in our ERD the minimum cardinality? (1 mark) How do we represent the maximum cardinality? (1 mark). Consider the two relationships: “a student can enrol in either 1, 2, 3, or 4 courses each semester AND a course can have student enrolments from zero to 500”. How would we represent the modality of the “student can enrol in either 1, 2, 3, or 4 courses” relationship? (1 mark). These relationships as they are described cannot be implemented in a relational database – explain why? (1 mark)
explain comprehensively what is meant by the term cardinality (1 mark)
In respect to the ERD the terms cardinality refers to the relationship between a row of one table with an another the row of another table.
Cardinality can be one-to-one or one-to-many or many-to-many
For example : Suppose there are two tables : Student and Course
Now if a student from student table can only be enrolled in one course form the course table , it is the one-on-one cardinality.
However if the student from the student table can enroll in more than one course in the course table it is referred to as the one-to-many cardinality.
If n students from student table can apply to m number of courses from the m table , it is referred to as many-to-many cardinality
how do we represent in our ERD the minimum cardinality? (1 mark)
The minimum carindality refers to the minimum number of the "entity-instances" that must be present in the given relationship.
It is represented as :
Zero [0] ---> Optional
One [1]----> Mandatory
The relationships are represented as :
How do we represent the maximum cardinality? (1 mark).
The maximum cardinality refers to the maximum number fo entity instances that can exist in a relationship.
They are represented as :
Consider the two relationships: “a student can enrol in either 1, 2, 3, or 4 courses each semester AND a course can have student enrolments from zero to 500”. How would we represent the modality of the “student can enrol in either 1, 2, 3, or 4 courses” relationship? (1 mark).
The modality or the minimum cardinality representation in this case will be :
Optional to Mandatory
These relationships as they are described cannot be implemented in a relational database – explain why? (1 mark)
A M:N or a one to many relationship is not supported in relational databases.
In a relational database, the ideal mode is 1:N or 1-to many and all the relationships have to be changed to the given 1:M ideal.
Get Answers For Free
Most questions answered within 1 hours.