Database Management Systems
Database Management Systems
MANAGEMENT
SYSTEMS
OVERVIEW OF DBMS DESIGN PROCESS
Choose the
Characterize the Review the
correct data Implementation:
data schema
model.
• Specification of • E-R Model is • Check if the • Logical Design
user used to functional Phase
requirements. represent the requirements • Physical Design
conceptual are met Phase
schema.
ENTITY –RELATIONSHIP MODEL (E-R MODEL)
3 aspects of E-R Model are:
1. Entity Sets
2. Relationship Sets
3. Attributes
ENTITY SETS
• Entity is a thing or object that is distinguishable from all other
objects.
Eg: Every Person in the university is an entity
• There are some unique properties that define an entity
Eg: Student id
• Entity Set: A set of entities of the same type that share same
properties or attributes.
Eg: Entity set of students
• Entity is represented by a set of attributes.
Eg: Attributes of Instructor(ID, DEPT NAME, SALARY)
• Entity Set is represented by a rectangle which has 2 parts:
1. Name of the Entity
2. Names of all attributes of the entity Set
RELATIONSHIP SETS
• Relationship is an association among different entities.
• A relationship set is a set of relationships of the same type.
Ex: Relationship set advisor denotes the association
between students and instructors.
• It is represented by a diamond shape in the E-R Model.
• The function that an entity plays in a relationship is
called its role.
• Descriptive attributes:
Represented by an undivided rectangle which are linked
to the rectangle using a dashed line.
• Complex E-R designs may need to be split into multiple
diagrams located in different pages.
• No two entities are allowed to have exactly the same value for all
attributes.
1. Specialization
2. Generalization
3. Aggregation
SPECIALIZATION
• The process of designating subgroupings within an entity set is called
specialization.
Example: The entity set person may be further classified as one of the
following:
• employee
• student
2. Disjoint Specialization:
The entity belong to at most one specialized entity set.
A single arrow is used.
Completeness Constrain
1. Total
Specialization : Every entity that belongs to a superclass
must belong to at least one subclass of the specialization.
2. Partial specialization: Some entities might not belong to any
of the subclasses of the specialization
Partial specialization is the default.
Total specialization is represented by adding the keyword “total” in the
diagram.
The completeness and disjointness constraints, do not
depend on each other.
Consider the relationship set advisor which involves the following entity sets:
1. instructor, with the primary key ID.
2. student, with the primary key ID.
Since both attributes have the same name, we rename them i ID and s ID.
Since the advisor relationship set is many-to-one from student to instructor the primary
key for the advisor relation schema is s ID.
advisor (s ID, i ID)
REPRESENTATION OF SPECIALIZATION & GENERALIZATION
• Create a schema for the higher-level entity set.
• For each lower-level entity set, create a schema that includes its
attributes and the primary key of the higher-level entity set.
REPRESENTATION OF AGGREGATION