Lecture 4: Database Design Flashcards

1
Q

What can speed up retrieval of data?

A

Keys and indexes

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

What to consider designing a database?

A

– Inclusion of all information
– Selection of correct datatypes
– Creation of keys / indexes

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

What is normalisation?

A

Normalisation is the process of efficiently organising data in a database.

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

Goals of normalisation:

A

– eliminating redundant data (storing the same
data in multiple tables)
– ensuring data dependencies make sense (only
storing related data in a table).

Makes updating DB more efficient

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

How many NF are there and which is most common?

A

0-5 + BCNF
3NF

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

Explain 1NF

A
  • Eliminate duplicate fields from the same table
  • Create separate tables for each group of
    related data
  • Identify each row with a unique value (primary
    key)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Explain 2NF

A

Removes more duplicate information
– There must not be any partial dependency of any column on primary key (bijv. the criminal data only depends on CaseID and not ID)

  • The guidelines are:
    – Meet 1NF requirements
    – Remove subsets of data that apply to multiple rows of
    a table and place them in separate tables.
    – Create relationships between these new tables and
    their predecessors (foreign keys)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

3NF requirements

A

– Meet all 2NF requirements
– Remove fields that are not dependent upon
the primary key (bijv. street and city are dependent on zip code)

Often of third normal form it is said that
the data should “ … depend on the key,
the whole key, and nothing but the
key.”

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