lec02.366

lec02.366 - . . Winter 2008 CPE/CSC 366: Database Modeling,...

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

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: . . Winter 2008 CPE/CSC 366: Database Modeling, Design and Implementation Alexander Dekhtyar . . The Entity-Relationship Model (E-R Model) In a Nutshell E-R model: Graphical; Models Entities (data objects, units of information) and ... Relationships between entities . In More Detail Entities Entity: object in a real world, different from other objects. Unit of data. Entity set: collection of similar entities . Attribute: a single feature of an entity . Entities from same entity set have the same set of attributes (i.e. are identifiable by the same set of features). Attributes take values from domains . Key: minimal set of attributes whose values uniquely identify an entity . If more than one key exists, one of them is designated as primary key . Instance of an entity set : set of specific entities. Relationships Relationship: association between two or more entities . Relationship set: association between two or more entity sets . Descriptive attributes: features of relationships. Instance of a relationship set : set of relationships . 1 CardNo. Issue_Date Name Lib_Code Publisher Author ISBN Title Address Phone Patrons Loans Date_Borrowed Due Returned Books Figure 1: Simple E-R diagram for the Library database. Entity-Relationship Diagrams: part I Entity-Relationship Diagram (ER diagram, E-R diagram) : graph rep- resenting the conceptual model of a database using the conventions outlined below. Entity Set: Rectangle with entity set name inside. Attribute: Oval with attribute name inside. Primary Key Attribute: underlined attribute name. Association of attributes with entity sets : Edges between ovals and rect- angles . Relationship Sets: Diamond with relationship set name inside. Descriptive Attributes: attributes ( ovals ) connected directly to rela- tionship sets ( diamonds ). Example. Figure 1 shows an E-R diagram for a simple library database. The database description is as follows: The library keeps tracks of books and library patrons who borrow books. A book is identified uniquely by a library code. Other infor- mation available about the book is its ISBN number, title, author, publisher and the year of publication. A patron of the library must have a membership card. The card number is used to uniquely identify each patron. Other information available about each patron is the name, address, phone, and the issue date of the membership card....
View Full Document

Page1 / 6

lec02.366 - . . Winter 2008 CPE/CSC 366: Database Modeling,...

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

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