Database Design Flashcards

1
Q

WHat is meant by business data being:
Valuable
Persistent
Protected

A

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 well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How do we store programs in memory? data structure? issues?

A

arbitrary connected graph
may be extended dynamically
navigation by object reference

objects may have ‘rich’ data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How do we store database files on a disk? data structure

A

Simple data types
fixed strucutre
data tables have fixed width
navigation by key values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the original purpose of relational databases?

A

to eliminate redundancy

to minimize dependancy between data items

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

In what way do we navigate through database tables?

Why?

A

from many (foreign key) to one (primary key)

otherwise we would have to change the size of the foreign key field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Briefly describe relational data analysis

A

Set of rules for transforming arbitrary data tables into normal form based on analysis of attribute dependency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Brielfy describe entity relationship modelling for data normalization

A

diagram based technqiue based on simplfying relationships and multiplicities

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Breifly describe event driven design

A

constructs data model in 3nf normal form

event table & graph building technique linking according to existence dependency

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

When minimizing data dependency, what are our design goals?

A

+Remove duplicated data
+remove redundant paths
+optimise table structure for inserting, updating and deleting single data items

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

When minimizing data dependency, what is the minimization technique?

A

+ 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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is an involuted association? How is it normalized?

A

association linking a table to itself

involuted linker; only place where we allow a 1:1 relationship to still exist

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is a ternary assocation? How is it normalized?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the traditional method of data normalization?

A
  • 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
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is required for 1NF?
2NF?
3NF?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What to check when looking at database design?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Why might we want to denormalize data?

A

to increase the efficiency of searches

to reduce the fragmentation of data

17
Q

What is the multiplicity of a generalisation?

A
0:1 to 1
when 0:1 is subclass
              1 is superclass
18
Q

When looking at denormalization; what are the costs of reducing the number of tables?

A

wasted space through null values (generalisations)

replicate part data many times (compositions)

19
Q

When looking at denormalizations, what are the costs of optimzing access paths?

A

(retain redundant paths) additional foreign keys, risk of inconsistency