Lecture 5: Database Design Review Flashcards
List the three database design
- conceptual
- logical
- physical
quick explanation of conceptual database design.
includes identification of the important:
- entities
- relationships
- attributes
quick explanation of logical database design.
translate the conceptual to logical structure which includes designing the relations:
quick explanation of physical database design.
decide how the logical structure is to be physically implemented (as base relation) in the target DBMS. (first stage of considering issues such as data type)
Name all relational keys plus three extra keys
- superkey
- candidate key
- primary key
- foreign key
- composite key
- alternative (secondary)
- surrogate key
- simple key
- compound key
What is a surrogate key?
used by develops when the PK is considered unsuitable
created and managed via the DBMS
have a numeric value which is automatically incremented for each new row
List and explain each constraint
- entity integrity:
no attribute of a primary key can be NULL - referential integrity:
if a foreign key exist, either the value of the foreign key matches the value of the candidate key in the home relation or the value of the foreign key is NULL - domain constraints:
the value of each attribute in each tuple must be from the domain assigned to this attribute - primary key constraints:
two distinct tuples in any state of the relation cannot have identical values for all attributes in the key.
Quickly explain the conceptual stage of the database design
Step 1. build conceptual data model
- identify entity types
- identify relationship types
- identify and assosciate attributes with entity or relationship types
- determine attribute domains
- determine CK, PK, Alternate key attributes
- determine multiplicity
- validate conceptual model against user transactions
List the logical stage of the database design
Step 2 build and validate logical data model
- derive relations for the logical data model
- validate relations using norms.
- define integrity constraints
- check for future growth
List the physical stage of the database design
Step 3: translate the logical data model to MySQL
- design base relations
- design representation of derived data
- design general constraints
- create indexes
- create views
- define security requirements
- consider the intro of controlled redundancy