![]() |
An entity is the basic object in an E-R model. |
![]() |
It represents an object in the real world that can be distinctly identified. |
![]() |
For example, library database can include entities such as book, member, department, etc. |
![]() |
Two types of entities can be specified in the E-R model which are: |
![]() |
Weak entity: that is its existence is dependent on another entity. |
![]() |
For example, a borrowedBook entity could be a weak entity as its existence depends on the member entity. | ||
![]() |
If a library member is deleted, all the borrowed books records in borrowedBook must be deleted too. | ||
![]() |
The member entity is called the identifying owner. | ||
![]() |
The relationship (see Lecture 10) between the weak entity and the identifying owner entity is called the identifying relationship of the weak entity. |
![]() |
Regular entity: its existence is not dependent on any other entity. |
![]() |
Graphically, in an E-R model, a regular entity is represented by a rectangle box. |
![]() |
Weak entities are distinguished with a double box notation as shown in Figure 9.1. |

![]() |
An entity can have a number of attributes which represent the properties of the entity. |
![]() |
E.g., all books entities can have attributes such as book title, book author and publisher. |
![]() |
Each attribute is associated with a domain which specifies the type the attribute’ s values. |
![]() |
Attributes in an E-R model can be: |
![]() |
Composite or Simple attributes: |
![]() |
A composite attribute can be composed of several simple attributes. | ||
![]() |
For example, the Member Name attribute can be a composite attribute which can contain attributes First Name, Middle Initials and Last Name. |
![]() |
Note that a composite attribute can have another composite attribute as part of it. | ||
![]() |
A simple attribute is not divisible, also called an atomic attribute. First Name, Middle Name and Last Name can be simple attributes. |
![]() |
Key Attribute: |
![]() |
The value of a key attribute of an entity instance uniquely identifies the entity instance. | ||
![]() |
For example, a Member ID attribute can be the key attribute in a Member entity as no two members can have the same member id. | ||
![]() |
A key can be formed of several attributes. |
![]() |
Single-valued or Multi-valued Attributes: |
![]() |
Most attributes are single-valued, i.e. can have at most one value. | ||
![]() |
For example, a First Name attribute in a Member entity can have one value only, e.g. “smith”. | ||
![]() |
However, attributes can also be multi-valued. | ||
![]() |
An example could be a Qualification attribute in a Author entity, which can hold more than one value representing different qualifications for an author. |
![]() |
Base or Derived Attributes: |
![]() |
Attributes can be related in a way that one attribute is derived from another attribute. | ||
![]() |
An example is a Borrowing Duration attribute which can be derived from the Date of Borrowing and Date of Return of a book. |
![]() |
Missing Attribute: |
![]() |
When there is no applicable value for an attribute, a special value Null is used. | ||
![]() |
For example, a Qualification attribute may have value Null when an author has no qualification. |
