1 / 17

E-R Diagrams

E-R Diagrams. Dr. Mario Guimaraes. Class Will Start Momentarily…. E-R Introduction. Database design tool proposed by Peter Chen (1976). The real world is seen represented as entities, relationships and attributes. Example:. Components of E-R. Entity types Relationship types

Download Presentation

E-R Diagrams

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. E-R Diagrams Dr. Mario Guimaraes • Class • Will • Start • Momentarily…

  2. E-R Introduction • Database design tool proposed by Peter Chen (1976). The real world is seen represented as entities, relationships and attributes. Example:

  3. Components of E-R • Entity types • Relationship types • Attributes • Cardinality (minimum and maximum) Coffee.kennesaw.edu -> DB Design -> E-R (under testing)

  4. Degree of Relationship • Degree of a Relationship • Number of participating entities in relationship. • Relationship of degree: • one is unary; • two is binary; • three is ternary; Most Relationships are of _______ degree

  5. Binary Relationships • The most common degree for relationships is binary. • Binary relationships are generally referred to as being: • one-to-one (1:1) • one-to-many (1:*) • many-to-many (*:*)

  6. Special Entity/Attribbutes • Other important terminology weak entity multi-valued attribute composite attribute surrogate key

  7. Generalization/Specialization • Superclass • An entity type that includes one or more distinct subgroupings of its occurrences. • Subclass • A distinct subgrouping of occurrences of an entity type.

  8. Characteristics of Subclass • Superclass/subclass relationship is one-to-one (1,1:0,1). • Superclass may contain overlapping or distinct (disjoint) subclasses. • Not all members of a superclass need be a member of a subclass (Partial Specialization). Summary: subclass may be overlapping or disjoint, partial or total.

  9. Convert Scenarios to E-R • A specific DRUG is prescribed for a specific PATIENT bya a specific PHYSICIAN. A PHYSICIAN may issue many different prescritions for a given PATIENT. Likewise, a PATIENT may have several different DRUGs prescribed by different PHYSICIANS. Draw an E-R Diagram.

  10. Convert E-R to tables • 1:N - add a column on the child side • N:N – associate table (two binaries) • 1:1 - look at the minimum cardinality • Recursive or Unary • Ternary -> 3 binaries

  11. Identify cardinality

  12. ER, EER, Class Diagram • EER is a superset of an ER. What is the difference ? • Class Diagram is a superset of a EER. What is the difference ?

  13. Super-type/Sub-type • What is the default for converting Super-type/Sub-types to tables ?

  14. Referential Integrity • Restrict or No Action • Cascade • Set Null • Animation or http://students.kennesaw.edu/~rzillige/CoffeeCourseware.html

  15. Normalization • All non-key attributes should be dependent on the key, the whole key and nothing but the key. (1NF) (2NF) (3NF, BCNF)

  16. End of Lecture End Of Today’s Lecture.

More Related