Week 3

3.2 Attributes

An ATTRIBUTE is a property or characteristic of an entity type. In ER diagrams, attributes are represented as OVALS connected to their entity type.

Attribute Type

Definition and Example

Simple (Atomic)

Cannot be divided further. E.g., StudentID, DateOfBirth, GPA

Composite

Can be divided into smaller sub-parts. E.g., Address → (StreetNo, StreetName, LGA, State). E.g., FullName → (FirstName, MiddleName, LastName)

Multi-valued

Can have multiple values for one entity. E.g., a Lecturer may have multiple PhoneNumbers. Drawn as DOUBLE OVAL.

Derived

Value is computed from other attributes. E.g., Age derived from DateOfBirth; TotalCreditUnits derived from registered courses. Drawn as DASHED OVAL.

Key Attribute

Uniquely identifies each entity instance. E.g., MatricNumber for STUDENT. Underlined in ER diagram.

Null Attribute

May have no value for some instances. E.g., MiddleName may be absent for some students.