Fall08-Lec2

Fall08-Lec2 - Entity-Relationship and Enhanced...

Info iconThis preview shows pages 1–7. Sign up to view the full content.

View Full Document Right Arrow Icon
Sunday, September 1 Entity-Relationship and Enhanced Entity-Relationship Conceptual Data Models (Chapters 6 & Section 7.1)
Background image of page 1

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

View Full DocumentRight Arrow Icon
Sunday, September 2 E-R MODEL E-R model is based on a real world that consists of entities and relationships. It consists of two primitives: 1. Entities : objects that exist and are distinguishable from one another. These objects might be abstract, e.g., SF-49ers, Joe, Bob, etc. 2. Relationships : two or more entities may participate in a relationship, e.g., Joe is a fan of SF-49ers, etc. An entity is represented by a set of attributes, e.g., Joe might have a social- security number, a phone number, a spouse, and a salary An attribute is a function that maps an entity into a domain, e.g., Joe's social- security number maps Joe into the domain of integers. An attribute is represented as an A set of entities of the same type is termed an entity set , e.g., football teams. Entity sets do not need to be disjoint, e.g., students, employees, people. An entity set is represented as a
Background image of page 2
Sunday, September 3 RELATIONSHIPS Relationships of the same type are contained in a relationship set. More formally, if E 1 , E 2 , . .., E n are entity sets, then a relationship set R is a subset of: {( e 1 , e 2 , . .., e n ) | e 1 E 1 , e 2 E 2 , . .., e n E n } where ( e 1 , e 2 , . .., e n ) is a relationship. A relationship set is represented as a A relationship may involve two entities, binary relationship: A relationship may involve three entities, ternary relationship: Football Teams fans People Football Teams fans People Date
Background image of page 3

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

View Full DocumentRight Arrow Icon
Sunday, September 4 A relationship does not require participation of entities from a set. In the previous example, John as an entity in “People” entity-set and is not required to participate in a relationship with “Football Teams” entity-set. There are times, when one may want to specify that all members of an entity set MUST participate in a relationship. Use double lines to represent this case. The double lines specifies total participation of entities in People entity set in the “fans” relationship set. RELATIONSHIPS Football Teams fans People
Background image of page 4
Sunday, September 5 RELATIONSHIPS (Cont…) A relationship may involve n entities, N-ary relationship It is always possible to replace a non-binary relationship set by a number of distinct binary relationship sets Football Teams fans People Date on
Background image of page 5

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

View Full DocumentRight Arrow Icon
Sunday, September 6 RELATIONSHIPS (Cont…) Example: A library database contains a listing of authors that have written books on various subjects (one author per book). It also contains information about libraries that carry books on various subjects.
Background image of page 6
Image of page 7
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 01/11/2009 for the course CSCI 485 taught by Professor Ghandeharizadeh during the Fall '08 term at USC.

Page1 / 23

Fall08-Lec2 - Entity-Relationship and Enhanced...

This preview shows document pages 1 - 7. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online