Database Normalisation Flashcards

1
Q

What is normalisation?

A

The process to minimise redundancy and improve consistency in databases

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

What are the two major goals that drive DB design by means or normalisation?

A

Information preservation and minimum redundancy

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

What are the four informal guidelines that can determine the quality of relation schema design?

A
  1. Clear semantics of the attributes in the schema
  2. Reducing the redundant information in tuples
  3. Reducing the null values in tuples
    4, Disallowing the possibility of generating spurious tuples
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is a conceptual design?

A

specifies the requirements of the users, a detailed overview of the enterprise and ensure the requirements are met

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

What is a logical design?

A

maps the high level conceptual schema onto an implementation data model

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

What is a phsyical design?

A

specifies the physical features of the databases for the chosen DBMS

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

What is a functional dependency?

A

A formal constraint among attributes, so that they behave like functions

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

What is an injective function?

A

Every subset of the codomain is at most the image of a single domain element (i.e. two domain elements cannot have the same image)

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

What is a surjective function?

A

Every subset of the codomain has at least one pre-image (i.e. the range is the full codomain)

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

What is a key?

A

A minimal uniqueness constraint on attributes. A table can have multiple candidate keys

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

What are the rules of a key?

A

It cannot be NULL, the value must be unique, primary key values should rarely be changed, primary key must be given a value when a new record is inserted

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

When is a relation in 1st normal form?

A

It contains no duplicate associations, all attributes are atomic (single valued), all attributes are distinct, the ordering of rows is irrelevant.

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

When is a relation in 2nd normal form?

A
  1. It is in 1NF
  2. Every non-prime attribute of the relation is fully dependant on each candidate key of the relation (OR All non-key attributes are fully functionally dependent on the primary key)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

When is a relation in 3rd normal form?

A
  1. It is in 2NF
  2. It has no transitive functional dependencies (OR All non-key attributes are transitively dependent on the primary key)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly