6. ENTITY RELATIONSHIP MODEL
ER Model- Basic Concepts.
Entity
Attributes and its types
Entity-set and keys
Relationship And Mapping Cardinality
7. ER Model - Basic Concepts
The ER model defines the three most relevant steps. It works
around real-world entities and the associations among them.
At view level, the ER model is considered a good option for
designing databases.
• Requirement Analysis
• Conceptual Database Design
• Logical Database Design
8. Requirement Analysis
The very first step in designing a database
application is to understand what data us to be
stored in the database, what applications must be
built on the top of it, and what operations are we
must find out what the users want from the
database.
9. Conceptual Database Design
The information gathered in the requirements analysis step
is used to develop a high-level description of the data to be
stored in database, along with the constraints known to
hold over the data.
The ER model is one of the high-level or semantic, data
models used in database.
10. Logical Database Design
We must choose a DBMS to implement our database design,
and convert the conceptual database design into a database
schema in the data model of chosen DBMS. Sometimes
conceptual schema is called logical schema in Relational Data
Model.
11. Entity
An entity can be a real-world object, either animate or
inanimate, that can be easily identifiable.
For example school database, students, teachers,
classes, and courses offered can be considered as
entities.
All these entities have some attributes or properties that
give them their identity.
12. Entity Set
An entity set is a collection of similar types of
entities. An entity set may contain entities with
attribute sharing similar values.
For example, a Students set may contain all the
students of a school; likewise a Teachers set
may contain all the teachers of a school from all
faculties. Entity sets need not be disjoint
13. Attributes
Entities are represented by means of their properties, called
attributes. All attributes have values. For example, a student
entity may have name, class, and age as attributes.
There exists a domain or range of values that
can be assigned to attributes.
For example,
a student's name cannot be a numeric value.
It has to be alphabetic.
A student's age cannot be negative, etc.
14. Mapping Cardinalities
Cardinality defines the number of entities in one entity set,
which can be associated with the number of entities of
other set via relationship set.
15. Types of Cardinalities
1.One-to-one
One entity from entity set A can be associated with
at most one entity of entity set B and vice versa.
2.One-to-many
One entity from entity set A can be associated
with more than one entities of entity set B however
an entity from entity set B, can be associated
with at most one entity
16. Types of Cardinalities (Cont.)
3. Many to One
More than one entities from entity set A can be associated with
at most one entity of entity set B, however an entity from entity
set B can be associated with more than one entity from entity set A.
4. Many to Many
One entity from A can be associated with
more than one entity from B and vice versa.
19. SYMBOLS AND NOTATIONS
Entities: An entity is an object or concept about
which you want to store information.
Weak entities: A weak entity is an entity that must defined
by a foreign key relationship with another entity
as it cannot be uniquely identified by its own attributes alone.
20. Actions: Actions are represented by diamond shape, and show how
two, entities share information in the database.
Attribute: This is attribute symbol . Attribute is the unique
distinguishing characteristics
Of the entity.
Multivalued Attribute: A multivalued attribute can have
more then one attribute.
Derived Attribute: Derived attribute derive from
another attribute.
SYMBOLS AND NOTATIONS
(Cont.)
21. Real life example of E-R diagram
This e-r diagram shows the relation between teacher and student.
22. EXTENDED FEATURES OF ERD
As the complexity of data increased, it become more and more
difficult to use the traditional ER model for database modeling.
So some new features are included in the Basic ER model. The
combination of Basic ER model and new feature is called
Extended ER model.
New features are:
Generalization
Specialization
Aggregation
23. Generalization is the process of extracting
common properties from a set of entities
and create a generalized entity from it.
It is a Bottom-up Approach in which two or more
entities can be combined to form a higher level entity if they
have some attribute in common.
Generalization
24. Specialization is opposite of Generalization.
In Specialization, an entity is broken down into
sub-entities based on their characteristics.
Specialization is a “Top-down Approach” where higher
level entity is specialized into two or more lower level entities.
Specialization
25. Aggregation is used to express a relationship
among relationships.
Aggregation is an abstraction through which
relationships are treated as higher level entities.
Aggregation is a process when a relationship
between to two entities is considered as a single entity and again this
single entity has a relationship with another entity.
Aggregation
26. Conclusion
So, in this presentation, we studied about Data Models and its
parts, i.e Entity Relationship Models, Entity Relationship Diagram
and its Extended Features.
Beside this, we also learn about the use of them in database
system the application, which the information technology field
use as one of the major software in computer field.