E R Model Basics

Post on 06-Apr-2018

219 views 0 download

Transcript of E R Model Basics

  • 8/2/2019 E R Model Basics

    1/19

    Entity Relationship Models

    Sumant Kulkarni, Yogalakshmi{sumant.kulkarni, j.yogalakshmi}@iiitb.org

    1/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    2/19

    Agenda

    Use of ER Model for Conceptual Models

    Basic Structure of ER Model

    Example of ER model development

    Discussion

    2/27

    http://find/
  • 8/2/2019 E R Model Basics

    3/19

    ER Model

    Concise description of data requirements of the users

    For better visualization of entities and relations

    Understanding concepts involved in the miniworld

    No implementation details

    3/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    4/19

    Basic Elements of ER Model

    The miniworld is described in terms of:

    Entity

    Attribute

    Relationships

    4/27

    http://find/
  • 8/2/2019 E R Model Basics

    5/19

    Description of an Example of a miniworld

    Every student is identified by his student number. The systemalso knows about his Date of Birth, current and permanentaddresses, and his joining date. Every student registers forsome courses or works for projects or does both. Student caneither audit the course or take it for credit. He obtains gradesfor the courses he takes on credit. These grades are availablefor all the subjects the student has taken on credit till now.These credits decide whether he has passed or failed in the

    subject.

    5/27

    http://find/
  • 8/2/2019 E R Model Basics

    6/19

    Description of an Example of a miniworld

    Every course is offered by one or more professors (combined).So, each faculty member spends a specific number of hours onthe course he offers. A professor can be involved in offeringmany courses. Every course belongs to a stream. It also has aname, unique course number. There are some creditassociated with the course.

    6/27

    http://find/
  • 8/2/2019 E R Model Basics

    7/19

    Description of an Example of a miniworld

    Professor may be in-charges of a lab. A lab can have one ormore in-charges. A lab can have multiple projects runningunder it from specific start dates. If a student opts to work for

    a projects, then depending upon the need of the project, hehas to spend some know amount of time on the project.Similar to the student id, there will be unique identificationnumbers for every faculty member, lab and project.

    7/27

    http://find/
  • 8/2/2019 E R Model Basics

    8/19

    Elements of ER Model

    Entity

    Attribute

    Composite versus Simple (Atomic) Attributes Single-Valued versus Multivalued Attributes Stored versus Derived Attributes Null Attributes (NA)

    8/27

    http://find/
  • 8/2/2019 E R Model Basics

    9/19

    Elements of ER Model

    Entity Set

    Key Attributes of an Entity Type (uniqueness constraint)

    Value Sets (Domains) of Attributes. Value Set of composite attribute.

    V = P(V1)XP(V2)X...XP(Vn)where P(Vi) is the powerset of Vi.

    9/27

    http://find/
  • 8/2/2019 E R Model Basics

    10/19

    Exploring Relationships

    What is Relationship?

    Relationship Types Relationship Instances

    Relationship Sets

    Participation

    10/27

    http://find/
  • 8/2/2019 E R Model Basics

    11/19

    Exploring Relationships

    Relationship Degree (unary, binary, ternary)

    Relationship as Attributes

    Role Names and Recursive Relationships

    11/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    12/19

    Constraints on Relationship Types

    Cardinality Ratios for Binary Relationships

    Total participation (existence dependency) Partial participation

    12/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    13/19

    Attributes of Relationship Types

    Migration of Attributes from Relationship Types

    Migration in 1:1 Relationship type Migration in 1:N Relationship type.

    Migration in M:N Relationship type

    13/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    14/19

    Weak Entity Types

    Owner (identifying) entity type

    Identifying relationship

    A weak entity type always has a total participation constraint.

    A weak entity type normally has Partial key

    14/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    15/19

    Summery of Symbols

    Figure: Summery of Symbols of E-R modeling

    15/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    16/19

    Student Academic Information System as ER Model

    Let us list all the entities from the description given....

    16/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    17/19

    Relations between Entities

    Let us List down....

    17/27

    f

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    18/19

    References

    Elmasri, R. and Navathe, S.B. Fundamentals Of DatabaseSystems. Pearson Education

    Chen, P.P. The Entity Relationship Model - Towards a UnifiedView of Data. ACM Transactions on Database Systems. 1976

    18/27

    http://find/http://goback/
  • 8/2/2019 E R Model Basics

    19/19

    Any Questions/Inputs/Suggestions?

    19/27

    http://find/http://goback/