E-R Model.pdf

Info icon This preview shows pages 1–11. Sign up to view the full content.

E n t i t y R e l a t i o n s h i p M o d e l Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of an E-R Database Schema Reduction of an E-R Schema to Tables Copyright @
Image of page 1

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

E n t i t y S e t s A database can be modeled as: a collection of entities, relationship among entities. An entity is an object that exists and is distinguishable from other objects. Example: specific person, company, event, plant Entities have attributes Example: people have names and addresses An entity set is a set of entities of the same type that share the same properties. Example: set of all persons, companies, trees, holidays Copyright @
Image of page 2
E n t i t y S e t s c u s t o m e r a n d l o a n customer-id customer- customer- customer- loan- amount name street city number Copyright @
Image of page 3

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

A t t r i b u t e s An entity is represented by a set of attributes, that is descriptive properties possessed by all members of an entity set. Domain the set of permitted values for each attribute Attribute types: Simple and composite attributes. Single-valued and multi-valued attributes E.g. multivalued attribute: phone-numbers Derived attributes Can be computed from other attributes E.g. age , given date of birth Example: customer = (customer-id, customer-name, customer-street, customer-city) loan = (loan-number, amount) Copyright @
Image of page 4
C o m p o s i t e A t t r i b u t e s Copyright @
Image of page 5

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

R e l a t i o n s h i p S e t s A relationship is an association among several entities Example: Hayes depositor A-102 customer entityrelationship set account entity Example: (Hayes, A-102) depositor Copyright @
Image of page 6
Relationship Set borrower Copyright @
Image of page 7

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Relationship Sets (Cont.) An attribute can also be property of a relationship set. For instance, the depositor relationship set between entity sets customer and account may have the attribute access-date Copyright @
Image of page 8
Degree of a Relationship Set Refers to number of entity sets that participate in a relationship set. Relationship sets that involve two entity sets are binary (or degree two). Generally, most relationship sets in a database system are binary. Relationship sets may involve more than two entity sets. Relationships between more than two entity sets are rare. Most relationships are binary. E.g. Suppose employees of a bank may have jobs (responsibilities) at multiple branches, with different jobs at different branches. Then there is a ternary relationship set between entity sets employee, job and branch Copyright @
Image of page 9

Info icon This preview has intentionally blurred sections. Sign up to view the full version.

Mapping Cardinalities … Express the number of entities to which another entity can be associated via a relationship set.
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.
  • Fall '16
  • Entity-relationship model, Relational model, Foreign key, Candidate key, Copyright @ www.bcanotes.com

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern