Er diagram notation

Er diagram:

An Er diagram is called an Entity-relationship model. It is a representation of data in picture form.

 

Er diagram notation:

1) Entity:

A real-world with an independent actuality. It can be an object with physical existence are with conceptual existence. Here in the below diagram Student is the entity.

Entity notation in er diagram

2) Attributes:

Properties that describe the entities are called attributes. E.g:– In the above diagram Empname, Empid, and Agency are the attributes.

Types of attributes are

    • Simple attributes: Simple attributes cannot be divided further Example:- weight.
    • Composite attributes: It can be divided further. For example, the name can be divided into first name, middle name, and last name.
    • Single-valued attributes: Single-valued attributes have only one value for a particular entity. For example, age single-valued attribute of a person.
    • Multivalued attributes: Multivalued attributes can have a set of values for a particular entity. For example, a college degree, languages knew multivalued attributes of a person.

Multi valued attribute

    • Derived attributes: Derived attributes can be derived from other attributes.
    • Stored attributes: Stored attributes from which the value of other attributes are derived. Example:- birth date of a person.
    • Complex attributes: Complex attributes has multivalued and composite components in them.

3) Null values:

Null is something that is not applicable is unknown.

student ID age name phone number
1 18 Harry 6555455621
2 15 Ron NULL
3 16 Joshua 6455554545

 

4) Entity types:

An entity with the same attributes.

EX: STUDENT

Student id age name
1 18 Harry
2 15 Ron
3 16 Joshua

5) Entity set:

A collection of entity types at a point in time. Where E represents the entity set.

entity in er diagram notation

A weak entity set is denoted as:

6) Key attribute:

The attribute that is capable of identifying each entity uniquely.

Ex: Student id of the student in the above table.

7) Value set of attributes:

The set of values that can be assigned to an attribute.

8)  Relationship set:

relatioship set

9) Weak relationship set:

weak relationship set

Relationships in er diagram:

Relationships:

A relationship is an association or a connection or a link among two or more entities.

Degree of relationship:

It denotes the number of entity types that participate in a relationship.

Unary relationship:

A relationship that tells how many entities are associated or linked together relationship types of degree one is called unary relationships.

 

unary realtionship set

Binary relationship:

A binary relationship exists when there is an association between two entities.

binary relationship set

Ternary relationship:

A ternary relationship exists with there is an association among three entities.

ternary relationship set

 

Example of an entity-relationship diagram with Er diagram notation:

example for er diagram notation

  1. Entity set: Student, examination.
  2. Attributes of student: rollno, email, mobile, name.
  3. Attributes of Examination: semester, date_time, examid, subject, year.
  4. Relationship set: writes.
  5. Degree of relationship: binary relationship.
  6. Cardinality: many to many relationships(*…*).

 

Also, read Database Replication.

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *