Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

CHANDIGARH UNIVERSITY SOFTWARE ENGINEERING (CST-220)

Aim:-Draw ER Diagram.
Ans:-
An entity relationship diagram (ERD) shows the relationships of entity sets stored in a database. An entity in
this context is an object, a component of data. An entity set is a collection of similar entities. These entities
can have attributes that define its properties.
Common Entity Relationship Diagram Symbols
An ER diagram is a means of visualizing how the information a system produces is related. There are five
main components of an ERD:

 Entities, which are represented by rectangles. An entity is an object or concept about which you want

to store information.
 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.


 Actions, which are represented by diamond shapes, show how two entities share information in the

database.
 In some cases, entities can be self-linked. For example, employees can supervise other employees.

 Attributes, which are represented by ovals. A key attribute is the unique, distinguishing characteristic
of the entity. For example, an employee's social security number might be the employee's key
attribute.
CHANDIGARH UNIVERSITY SOFTWARE ENGINEERING (CST-220)

 A multivalued attribute can have more than one value. For example, an employee entity can have

multiple skill values.


 A derived attribute is based on another attribute. For example, an employee's monthly salary is based

on the employee's annual salary.


 Connecting lines, solid lines that connect attributes to show the relationships of entities in the
diagram.
 Cardinality specifies how many instances of an entity relate to one instance of another entity.
Ordinality is also closely linked to cardinality. While cardinality specifies the occurrences of a
relationship, ordinality describes the relationship as either mandatory or optional. In other words,
cardinality specifies the maximum number of relationships and ordinality specifies the absolute
minimum number of relationships.

There are many notation styles that


express cardinality.
CHANDIGARH UNIVERSITY SOFTWARE ENGINEERING (CST-220)
Example:-

You might also like