2. Data Independence
Data independence means a change of data at one level
should not affect another level. Two types of data
independence are present in this architecture:
Physical Data Independence: Any change in the physical
location of tables and indexes should not affect the
conceptual level or external view of data. This data
independence is easy to achieve and implemented by
most of the DBMS.
Conceptual Data Independence: The data at conceptual
level schema and external level schema must be
independent. This means a change in conceptual schema
should not affect external schema. e.g.; Adding or
deleting attributes of a table should not affect the user’s
view of the table. But this type of independence is
difficult to achieve as compared to physical data
independence because the changes in conceptual
schema are reflected in the user’s view.
3. ER MODEL
ER model stands for an
Entity-Relationship model. It
is a high-level data model.
This model is used to define
the data elements and
relationship for a specified
system.
It develops a conceptual
design for the database. It
also develops a very simple
and easy to design view of
data.
4.
5. An entity may be any object, class, person or place.
In the ER diagram, an entity can be represented as
rectangles.
Consider an organization as an example- manager,
product, employee, department etc. can be taken as
an entity.
a. Weak Entity
An entity that depends on another entity called a
weak entity. The weak entity doesn't contain any key
attribute of its own. The weak entity is represented
by a double rectangle.
6. Strong Entity Set Weak Entity Set
Strong entity set always has a
primary key.
It does not have enough
attributes to build a primary
key.
It is represented by a rectangle
symbol.
It is represented by a double
rectangle symbol.
It contains a Primary key
represented by the underline
symbol.
It contains a Partial Key which
is represented by a dashed
underline symbol.
The member of a strong entity
set is called as dominant entity
set.
The member of a weak entity
set called as a subordinate
entity set.
7. Attribute
The attribute is used to describe
the property of an entity. Eclipse
is used to represent an attribute.
For example, id, age, contact
number, name, etc. can be
attributes of a student.
a. Key Attribute
The key attribute is used to
represent the main
characteristics of an entity. It
represents a primary key. The
key attribute is represented by
an ellipse with the text
underlined.
b. Composite Attribute
An attribute that composed of
many other attributes is known as
a composite attribute. The
composite attribute is represented
by an ellipse, and those ellipses
are connected with an ellipse.
8. Multivalued Attribute
An attribute can have more
than one value. These
attributes are known as a
multivalued attribute. The
double oval is used to
represent multivalued
attribute.
For example, a student can
have more than one phone
number.
d. Derived Attribute
An attribute that can be
derived from other attribute is
known as a derived attribute.
It can be represented by a
dashed ellipse.
For example, A
person's age changes
over time and can be
derived from another
attribute like Date of
birth.
9. Relationship
A relationship
is used to
describe the
relation
between
entities.
Diamond or
rhombus is
used to
represent the
relationship.
There are four types of relationships. These are:
•One-to-one: When only a single instance of an
entity is associated with the relationship, it is termed
as '1:1'.
•One-to-many: When more than one instance of an
entity is related and linked with a relationship, it is
termed as '1:N'.
•Many-to-one: When more than one instance of an
entity is linked with the relationship, it is termed as
'N:1'.
•Many-to-many: When more than one instance of an
entity on the left and more than one instance of an
entity on the right can be linked with the relationship,
then it is termed as N:N relationship.
10. 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.
•One-to-one − One entity from entity set A can be associated with at most one entity of entity set B and vice
versa.
•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.
11. •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.
•Many-to-many − One entity from A can be associated with more than one entity from B and vice versa.
12. ER- Diagram Notations
ER- Diagram is a visual
representation of data that
describe how data is related to
each other.
•Rectangles: This symbol represent
entity types
•Ellipses : Symbol represent
attributes
•Diamonds: This symbol represents
relationship types
•Lines: It links attributes to entity
types and entity types with other
relationship types
•Primary key: attributes are
underlined
•Double Ellipses: Represent multi-
valued attributes
13.
14.
15. Advantages of ER Model
Conceptually it is very simple: ER model is very simple because if we know relationship
between entities and attributes, then we can easily draw an ER diagram.
Better visual representation: ER model is a diagrammatic representation of any logical
structure of database. By seeing ER diagram, we can easily understand relationship
among entities and relationship.
Effective communication tool: It is an effective communication tool for database
designer.
Highly integrated with relational model: ER model can be easily converted into
relational model by simply converting ER model into tables.
Easy conversion to any data model: ER model can be easily converted into another
data model like hierarchical data model, network data model and so on.