CSC265 ยท 2080 ยท 5 marks
What is conceptual data model? Explain different types of attributes used in ER diagram.
What is conceptual data model? Explain different types of attributes used in ER diagram. [5]
Quick answer
A conceptual data model is a collection of concepts used to describe the structure of a database at a high level of abstraction, independent of any physical implementation. It provides the necessary means to achieve abstraction and acts as a conceptual tool for describing data and the relationships among data.
Conceptual Data Model and Types of Attributes in ER Diagram
Conceptual Data Model (2 marks)
- It describes data at the logical and view level.
- It focuses on what data is stored rather than how it is stored.
- The most widely used conceptual data model is the Entity-Relationship (ER) Model.
The ER model describes the design of a database in terms of entities and relationships among them. An entity is an object in the real world with a set of attributes (e.g.,
customer_id,customer_name,customer_address).
Types of Attributes in ER Diagram (3 marks)
An attribute is a property or characteristic that describes an entity. The following types of attributes are used in ER diagrams:
1. Simple (Atomic) Attribute
- An attribute that cannot be divided into smaller sub-parts.
- It holds a single value.
- Example:
Roll_No,Age - Represented by an oval in ER diagram.
2. Composite Attribute
- An attribute that can be divided into smaller sub-parts, each representing a more basic attribute.
- Example:
Namecan be divided intoFirst_Name,Middle_Name,Last_Name. - Represented by an oval connected to smaller ovals.
3. Single-Valued Attribute
- An attribute that holds only one value for a particular entity.
- Example:
Date_of_Birth,SSN(Social Security Number).
4. Multi-Valued Attribute
- An attribute that can hold more than one value for a single entity.
- Example:
Phone_Number(a person may have multiple phone numbers). - Represented by a double oval in ER diagram.
5. Derived Attribute
- An attribute whose value can be derived or computed from another attribute.
- Example:
Agecan be derived fromDate_of_Birth. - Represented by a dashed oval in ER diagram.
6. Key Attribute
- An attribute that uniquely identifies each entity in an entity set.
- Example:
Student_ID,Employee_ID. - Represented by an oval with the attribute name underlined.
7. Null Attribute
- An attribute that may have a null (unknown or not applicable) value for some entities.
- Example:
Middle_Namemay be null for some persons.
Summary Table
| Attribute Type | Description | ER Symbol |
|---|---|---|
| Simple | Indivisible, single value | Oval |
| Composite | Divisible into sub-parts | Oval with sub-ovals |
| Single-Valued | One value per entity | Oval |
| Multi-Valued | Multiple values per entity | Double Oval |
| Derived | Computed from other attributes | Dashed Oval |
| Key | Uniquely identifies entity | Oval (underlined name) |
| Null | May have no value | Oval |
Short on time? The 1, 5 and 10 mark versions of this answer, flashcards and practice sets come with a program pass.