3.entity Relationship Diagram
3.entity Relationship Diagram
3.entity Relationship Diagram
Why use ER
Diagrams?
Here, are prime reasons for using the ER Diagram
1. Helps you to define terms related to entity relationship modeling
2. Provide a preview of how all your tables should connect, what fields are
going to be on each table
3. Helps to describe entities, attributes, relationships
4. ER diagrams are translatable into relational tables which allows you to
build databases quickly
5. ER diagrams can be used by database designers as a blueprint for
implementing data in specific software applications
6. The database designer gains a better understanding of the
information to
be contained in the database with the help of ERP diagram
7. ERD is allowed you to communicate with the logical structure of the
database to users
ER model is based on three basic concepts:
Entities
Attributes
Relationships
Why we need a Key?
Here, are reasons for using Keys in the DBMS system.
Strong entity set always has a It does not have enough attributes to build a primary key.
primary key.
It contains a Primary key represented It contains a Partial Key which is represented by a dashed underline
by the underline symbol. symbol.
The member of a strong entity set is The member of a weak entity set called as a subordinate entity set.
called as dominant entity set.
Primary Key is one of its attributes In a weak entity set, it is a combination of primary key and partial key of
which helps to identify its member. the strong entity set.
In the ER diagram the relationship The relationship between one strong and a weak entity set shown by
between two strong entity set shown using the double diamond symbol.
by using a diamond symbol.
The connecting line of the strong The line connecting the weak entity set for identifying relationship is
entity set with the relationship is double.
single.
A weak entity is a type of entity which doesn't have its key attribute. It can be
identified uniquely by considering the primary key of another entity. For that,
weak entity sets need to have participation.
Examples:
Generalization is a bottom-up approach in which two lower level entities combine to form a
higher level entity. In generalization, the higher level entity can also combine with other lower
level entities to make further higher level entity. For example, Saving and Current account
types entities can be generalised and an entity with name Account can be created, which
covers both.
Specialization is opposite to Generalization. It is a top-down approach in which one higher
level entity can be broken down into two lower level entity. In specialization, a higher level
entity may not have any lower-level entity sets, it's possible.
A surrogate key is any column or set of columns that can be declared as the primary key
instead of a "real" or natural key. Sometimes there can be several natural keys that could
be declared as the primary key, and these are all called candidate keys.
An EXAMPLES of ERD