E. R. Model (entity relationship model) (E-R Diagram) in DBMS

 E. R. Model (entity-relationship model) (E-R Diagram) in DBMS

Features of E. R. Model (entity-relationship model) (ER DIAGRAM):-

1.    Represented by E.R. diagram which is easy to use graphical tool for modeling data.

2.    GUI representation of the logical structure of a Database.

3.    easily converted into relations (tables)in the relational model.

4.    Helps designers to understand the requirements of end-user.

5.    decompose tool which use in entities and relationships.

6.    Very simple, nontechnical, doubt-free, easy to understand by various users, programmers, and designers.

7.    Define standard and logical level data.

8.    Use the Top-down approach of the database.

9.    An entity is independent, uniquely identified, and abstract from the complexities of a domain.

10. An entity defines real-world objects or things as physically or logically. Ex. a physical object (a house or a car) and logically (syllabus or a concept).

11. Entities can be used as nouns. Examples: a computer, an employee, a song, a mathematical theorem.

12. An entity type is a category. An entity is an instance of a given entity type. There are usually many instances of an entity type.

13. A relationship defines how entities are related to one another.

14. Relationships work as verbs, linking two or more nouns. Examples: an own relationship between a company and a computer, a supervises relationship between an employee and a department, a performed relationship between an artist and a song, a proves relationship between a mathematician and a conjecture.

15. Entities and relationships can both have attributes. Examples: an employee entity have an employee ids Number (eid) attribute;

16. Entity may be weak or strong.

17. Entity-relationship diagrams don't show single entities or single instances of relations.

18. Rectangles shape represent entity sets, and diamonds shape represent relationships.

19.   Attributes are defined by ovals shape and connections define bylines

 

Use ER Diagrams

Some important reasons for using the ER Diagram

  • Helps in defining entity-relationship modeling.
  • Define “ how all tables should connect, how many fields are in each table.
  • Helps to describe entities, attributes, relationships
  • ER diagrams are used for converting diagrams to relational tables.
  • build databases quickly.
  • ER diagrams are used by database designers as a blueprint for implementing data in specific applications software.
  • The database designer better understands the information of the database.

  •  Advantages of ER Model

    ·         Simple Concept: 

    ER model is very simple. Easily creates a relationship between entities and attributes, and easily draws an ER diagram.

     

    ·         Better visual representation: 

    ER model is a diagrammatic/graphical/pictorial representation of any logical structure of database, entities, and relationship.

    helps in understanding the data structure and in minimizing redundancy and other problems.

     

    ·         Effective communication tool: 

    effective communication tool for database designers and users.

     

    ·         Highly integrated with relational model: 

    ER model can be easily converted into the relational model (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.

     

    Disadvantages of ER Model

    ·         Limited constraints and specifications

    ·         Loss of information content: Some information be lost or hidden in the ER model

    ·         Limited relationship representation: ER model represents the limited relationship as compared to other data models like relational model etc.

    ·         No representation of data manipulation: It is difficult to show data manipulation in the ER model.

    ·         Popular for high-level design: ER model is very popular for designing high-level design

    ·         No industry standard for notation

     

    ================================================================

Steps to Create an ERD (entity relationship diagram)

Following are the steps to create an ERD.

 

QUESTION:-

In a university, a Student enrolls in Courses. 
A student must be assigned to at least one or more Courses. 
Each course is taught by a single Professor.
 To maintain instruction quality, a Professor can deliver only one course.
 
Answer :- we creates ERD by following steps :- 

 

Step 1) Entity Identification

We have three entities

  • Student
  • Course
  • Professor

Step 2) Relationship Identification

We have the following two relationships

  • The student is assigned a course
  • Professor delivers a course

Step 3) Cardinality Identification

Define the relationship between entities,

  • A student can be assigned multiple courses
  • A Professor can deliver only one course



Step 4) Identify Attributes

Ensure an attribute of one entity. If an attribute belongs to more than one entity, then it modifies to make it unique.

After the mapping, identify the primary Keys. If a unique key is not available, then create one.

Entity

Primary Key

Attribute

Student

Student_ID

StudentName

Professor

Employee_ID

ProfessorName

Course

Course_ID

CourseName


Step 5) Create the ERD

For creating ERD Diagram




  • Eliminate any redundant entities or relationships.
  • make sure that all entities and relationships are properly labelled.
  • make assure that each entity only appears a single time in the ER diagram.
  • Name every relationship, entity, and attribute are represented in the diagram.
  • use colours to highlight important portions of the ER diagram.

 

============================================================= 

Post a Comment

0 Comments