1. Contents
1. Relational Data Model Concepts
2. A Entity-Relationship Diagram
1) Design a Entity-Relationship Diagram
2) Mapping a Entity-Relationship Diagram
2. 1. Relational Data Model Concepts
Entity:
Distinguishable object that exists which is thing in the real world
with an independent existence.
(Example: a company, a job, a university course.)
Entity Type and Set:
Entity type (intension)
Employee
Attributes
Name, age, salary
Entity set (extension)
E1 = (john smith, 55, 80000)
E2 = (joe doe, 40, 20000)
E3 = (jane doe, 27, 30000)
.
.
.
3. 1. Relational Data Model Concepts
Attribute:
* Properties used to describe an entity.
- an employee entity have a name, address, sex, birthdates'.
* Several attributes can have the same domain
- the attributes indicate different roles in the relation.
Keys:
Unique identification by defining one or more of the attributes.
Utilized to sort and/or identify data in some manner.
4. 1. Relational Data Model Concepts
Weak Entity Type:
* One without any key attributes of its own.
* Identified by being related to another entity type (identifying
owner) through a relationship type (identifying relationship), in
combination with values of a set of its own attributes (partial key).
* Has total participation constraint w.r.t. Its identifying relationship.
Ex)
5. 1. Relational Data Model Concepts
Relationship:
* Association among two or more entities.
* Occur between entity types.
* Attribute of one entity type refers to another entity type.
Ex) Morris Akers teaches in the math & cs dept.
* It names one of the related entities.
* A uniquely identifiable association, which includes one occurrence
from each participating entity type.
6. 1. Relational Data Model Concepts
Cardinality:
* Specifies how many instances of an entity relate to one
instance of another entity.
7. 1. Relational Data Model Concepts
In a relational model the table, row, column and data type are
referred to using the following terms:
Table
Relation
Row
Tuple
Column
Attribute
Data type
Domain
8. 1. Relational Data Model Concepts
Advantages of Relational Data Model:
* Structural independence.
* Improved conceptual simplicity.
* Easier database design, implementation, management, and use
* Ad hoc query capability with SQL.
Disadvantages of Relational Data Model :
* Substantial hardware and system software overhead.
* Poor design and implementation is made easy.
* May promote “islands of information” problems.