Unit 2
Unit 2
DESIGN
INTRODUCTION:
IDENTIFYING ENTITIES TO BE REPRESENTED IN THE
DATABASE AND REPRESENTATION OF HOW THOSE ENTITIES ARE
RELATED.
A BLUEPRINT THAT DESCRIBES HOW DATA IS STRUCTURED
AND CONNECTED IN A DATABASE.
Design phases:
Requirement analysis.
Conceptual database design
Logical database design
Schema refinement
Physical database design
Application & security design
ER MODEL
OVERALL LOGICAL STRUCTURE OF DB
1) ENTITY SETS
STUDENT
2)RELATIONSHIP SETS
3)ATTRIBUTES
TYPES OF ATTRIBUTES
• Simple Attribute
• Composite Attribute
• Single-Valued Attribute
• Multi-Valued Attribute
• Derived Attribute
Simple attributes
Ternary Relationships:
Weak Entity & Strong Entity
Strong Entity
does not depend on other Entity in the Schema.
it is represented by a rectangle.
primary key, that helps in identifying it uniquely
Weak Entity
cannot identifying it uniquely.
Enhanced Entity-Relationship
(EER
an extension of the original Entity-Relationship (ER)
model
Generalization:
process of extracting common properties from a set of
entities and creating a generalized entity from it.
Specialization:
an entity is divided into sub-entities based on its
characteristics.
It is a top-down approach where the higher-level entity is
specialized into two or more lower-level.
Generalization &
Specialization
Constraints:Generalization &
Specialization
constraints ensure the relationships between super classes and
subclasses are well-defined, with the primary constraints
Types:
Membership constraints
Disjoint constraints
Completeness constraints
Overlapping constraints
constraints Types:
Member
where a subclass can have constraints on its membership in the
superclass.
Disjoint:
subclasses are disjoint, an entity can only belong to one of them.
Completeness:
constraint determines if a superclass instance must also be a member
of at least one subclass
Overlapping
higher level entity may belong to more than one lower-level entity set
Aggregation
Not capable of representing the relationship between an entity.
abstraction through which we can represent relationships as
higher-level entity sets.