MGMT 382 1st Edition Lecture 6Current LectureI. E-R Modela. What should an entity be?i. Nounsii. Object with many instances in the database iii. Object composed of multiple attributes iv. Object we are trying to model b. NOT bei. User of databaseii. Output of database system (report) 1. A/R just an outcome c. Identifier(key): unique attribute or combination of attributes that identifies individual instances of an entity type d. Candidate key- attribute that could be a key satisfies the requirements for being a key: ID# for purdue, Social security number e. Composite: 2+ attribute fields- using first and last name in 382 vs simple key (1 key) i. Policy can dictate what key is used II. Characteristics a. Wont change in value—no inconsistency b. Wont be nullc. No intelligent identifiers (know value tells us something about that person)- adding WL to student id number d. Substitute new, simple keys for long, composite keys III. Numeric- always talking about maximum a. Cardinality of relationshipi. One-to-one- each entity in the relationship will have exactly one related entity- 1 student per car @ purdueii. One-to-many- an entity on oneside of the relationship can have many realted entities, but an entity on other side will have a maximum of one realted entity- one student can register 1(+) cars at purdue iii. Many-to-many:entities on both sides of the relationship can have many related entities on the other sideThese notes represent a detailed interpretation of the professor’s lecture. GradeBuddy is best used as a supplement to your own notes, not as a substitute.1. Studentmany cars any car can be registered by many students IV. Constraints - # instances of one entity that can or must be associated with instance of another entity a. Minimum cardinalityi. 0 optional con/may/if you want ii. 1 (+) mandatory- hard, you must 1. –Max V. E-R Diagramsa. Upright Rectangle There are two relationships going on here Student Car/ Car student *Always jump over relationship on opposite side One-to-one and one-to-many always has foreign key which is a link Registers – relationship- verbs CAR [Nouns]Model, make, color,year VINSTUDENT (Entity Name- always at top)Name , Address, Phone # Student
View Full Document