Entities and attribute Flashcards
2
Entities definition
A type of thing on which an organisation may wish to hold data.
Attributes definition
The data we need to know/collect about each entity.
Types of attributes:
– Simple (atomic) attributes
– Composite attributes (many parts)
– Single-valued
– Multi-valued attributes
– Derived attributes
Simple attributes example
student_name
Composite attributes example
Name = title + initial + surname
Single- valued example
Exam grade
Multi-valued attributes
Hobbies
Derived attributes example
wage is derivable from hours worked*hourly rate
Attribute domain definition
The set of all possible values of an attribute is the attribute domain. e.g. the domain for the attribute month could be January, February, March,…..
Relationships definition
How 2 or more entities are linked to one another.
e.g. Lecturer teaches Module.
Student attends Module.
Cardinality definition
How many instances of an entity relate to one instance of the other entity.
Cardinality examples
– One-to-one
– One-to-many
– Many-to-many
One to one relationship example
Each country has one capital.
Each capital has one country.
One to many relationship
Each student has one tutor.
Each tutor has many students.
Many to many relationship example
Each recipe uses many ingredients.
Each ingredient is used in many recipes.