Cardinality of Attributes
Given an entity E
and an attached attribute A
:
- Optional attribute if
min-card(A,E)=0
;
e.g., the attribute emp_address
of the entity employee
- Mandatory attribute if
min-card(A,E)=1
;
i.e., columns with NOT NULL
feature such as the attribute student_name
of the entity student
.
- Single-valued attribute if
max-card(A,E)=1
;
e.g., the attribute sid
of the entity student
- Multi-valued attribute if
max-card(A,E)=N
;
e.g., the attribute hobbies
of the entity employee
card(A,E) = (x,y) = (min-card(A,E),max-card(A,E))
The figure below shows the cardinality of attributes: