


























Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



























2– 1 Introduction to Database Design ( 1. 1. 1 ) CSC 370 [email protected]
UVic C SC 370 Dr. Daniel M. German Department of Computer Science May 5, 2004 Version: 1.1.
✥ What are the steps in designing a database? ✥ What is the entity-relationship (ER) model? ✥ How does UML related to the ER model? Chapter 2 of textbook
Database design can be divided in six major steps: ✥ Requirements analysis ✥ Conceptual Database design (mostly done using the ER model) ✥ Logical Database design ✥ Schema refinement ✥ Physical Database Design ✥ Application and Security Design
ER Diagram : ✥ an approximate description of the data, ✥ constructed through a subjective evaluation of the information, ✥ that was collected through the requirements analysis phase.
2– 8 Introduction to Database Design ( 1. 1. 1 ) CSC 370 [email protected]
✥ A relationship is an association among two or more entities ✥ A set of similar relationships is called a relationship set : {(e 1 , ..., en )|e 1 ∈ E 1 , ..., en ∈ En } ✥ Each n-tuple denotes a relationship involving n entities (e 1 , ..., en ) where ei is in the entity set Ei ✥ A relationship can also include its own attributes (called descriptive attributes ✥ A relationship must be uniquely identified by its participating entities
2– 10 Introduction to Database Design ( 1. 1. 1 ) CSC 370 [email protected]
name Since (^) dname ssn (^) lot did (^) budget Employees WorksIn2 (^) Departments address capacity
name ssn (^) lot Employees supervisor (^) subordinate ReportsTo
name Since (^) dname ssn (^) lot did (^) budget Employees (^) Manages Departments
name Since (^) dname ssn (^) lot did budget Employees (^) WorksIn3 Departments address capacity
name Since (^) dname ssn (^) lot did budget Employees (^) Manages Departments WorksIn Since
✥ Sometimes the attributes associated with an entity set do not include a key ✥ A weak entity can be identified uniquely only by considering some of its attributes in conjunction with the primary key of another entity (called identifying owner entity) ✥ The following restrictions must hold: ✦ The owner entity set is a one-to-many to the weak entity ( identifying relationship set ) ✦ The weak entity set should have total participation in the identifying relationship set. ✥ Represented by drawing the relation and the weak entity in thick lines
✥ Sometimes we need to define entities as “derivations” of others ( ISA ) ✥ That is, the attributes of an entity are those of another entity (its parent) plus other ones ✥ A class hierarchy can be seen in two different ways: ✦ Specialization: identify subsets of an entity that share some distinguishing characteristics ✦ Generalization: An entity is created that includes several characteristics common to different entity sets.
2– 20 Introduction to Database Design ( 1. 1. 1 ) CSC 370 [email protected] name ssn lot Employees hourlyWages hoursWorked (^) ISA contractId HourlyEmps ContractEmps