Database Design Flashcards
WHat is meant by business data being:
Valuable
Persistent
Protected
Valuable; forms the core of main business operations
often provides commercial edge
PErsistent; must survuve many executions of program
must be accessed by many programs
Protected; must be kept safe from system failure
must be kept from unauthorised access
How do we store programs in memory? data structure? issues?
arbitrary connected graph
may be extended dynamically
navigation by object reference
objects may have ‘rich’ data type
How do we store database files on a disk? data structure
Simple data types
fixed strucutre
data tables have fixed width
navigation by key values
What is the original purpose of relational databases?
to eliminate redundancy
to minimize dependancy between data items
In what way do we navigate through database tables?
Why?
from many (foreign key) to one (primary key)
otherwise we would have to change the size of the foreign key field
Briefly describe relational data analysis
Set of rules for transforming arbitrary data tables into normal form based on analysis of attribute dependency
Brielfy describe entity relationship modelling for data normalization
diagram based technqiue based on simplfying relationships and multiplicities
Breifly describe event driven design
constructs data model in 3nf normal form
event table & graph building technique linking according to existence dependency
When minimizing data dependency, what are our design goals?
+Remove duplicated data
+remove redundant paths
+optimise table structure for inserting, updating and deleting single data items
When minimizing data dependency, what is the minimization technique?
+ merge 1:1 tables
+ link 1:M tables from many to one
+ introduce linker tables for M:N relationships
+ find redundant search paths and remove the shorter path
What is an involuted association? How is it normalized?
association linking a table to itself
involuted linker; only place where we allow a 1:1 relationship to still exist
What is a ternary assocation? How is it normalized?
Highr order association linking 3 tables
need a ternary linker; don’t require all three primary keys to become pfk
- usually want to avoid, better to replace with 3 binary associations adn remove redundant path
What is the traditional method of data normalization?
- break up lists by replicating atomic data in many rows
- split into tables to remove replicated data
- make sure non-key attributes depend fully on the key
What is required for 1NF?
2NF?
3NF?
1NF:
atomicity rule
every row has a primary key
2NF:
nonkey attributes has full functional dependence on the primary key
3NF:
attributes dont depend transitively on the primary key
What to check when looking at database design?
Insertion anomaly: cant insert X until we have inserted Y
Update anomaly: update affects some but not all rows
Deletion anomaly: delete X has also deleted Y