week12 - Week 11 Continued Keys How do we distinguish an...

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

View Full Document Right Arrow Icon
Week 11 Continued….
Background image of page 1

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

View Full DocumentRight Arrow Icon
Keys : How do we distinguish an entity from other entities of the some entity set? How do we distinguish a relationship from others in the same relationship set? Use attributes! Superkeys : is a set of one or more attributes whose values uniquely identify an entity (relationship) in an entity (relationship) set. Employee: SSN, empName Candidate key : a super key which no proper subset is a super key. (Minimality) It is possible to have more than one candidate key. Primary key : One of the candidate keys chosen identification purposes. An entity with a primary key is strong entity. An entity that does not have primary key is weak entity. Transaction {transaction_number, date, amount} Unique within an account but between accounts there may be duplication discriminator. (Partial key) The discrimination of a weak entity set is a set of attributes tat serves to distinguish among entities in the entity set that depend on one particular strong entity. Primary key of a weak entity
Background image of page 2
Example = {account_number, transaction_number} Primary Key Of A Relationship Set Formed by union of primary keys of the associated entity set. Example 2.3 University database A professor has a SSN, name, age, rank, research specialty Projects have a project number, a sponsor name (e.g. NSF), a starting date, an ending date and a budget. Graduate students have SSN, name, age, and degree program.
Background image of page 3

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

View Full DocumentRight Arrow Icon
Each project is managed by one professor. (Known as project principle investigator.) Each project is worked on by one or more professor. (Known as the project co
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 14

week12 - Week 11 Continued Keys How do we distinguish an...

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

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