4.10 Fundamentals of DB (Normalisation) Flashcards

1
Q

What is Normalisation

A

The process which helps to organise and structure a database in a way which improves efficiency and integrity

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

What advantages does Data Normalisation bring

A
  • No redundancy, making size smaller and so more money efficient
  • One change cascades across related record making modification easier
  • Less data to search through makes the process of the query faster
  • Improves Data Integrity
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the disadvantages of normalisation

A
  • If the data is mad too atomic, fields may become unmeaningful
  • More tables are made than in 0NF
  • A more complex database is made meaning that querying data is also more complex and potentially slower
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is meant by a dependency

A

A value that varies in line with another value

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

What are the conditions for 0NF

A
  • Non-Atomic data
  • Repeating groups of data
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are the conditions for 1NF

A
  • No repeating geoups of attributes (2 of the same attribute)
  • Data is atomic
  • Each record must have a primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Process of 0NF –> 1NF

A
  • Separate repeating attributes into separate records.
  • Separate non-atomic values into separate attributes
  • Declare a primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is meant by a partial key dependency

A

Where the value of a data field relies entirely on part of the primary key where the primary key is a composite key

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

What are the conditions for 2NF

A
  • Must already be in 1st Normal Form
  • The must be no Partial Key dependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How do you identify and fix partial key dependencies for n partial dependencies

A
  • First ask for each non-key attribute “if the primary key changes does the attribute value change
  • Make n new tables where for each new table the primary key is the part of the primary key that one of the field relied on.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is meant by a non-key dependency

A

Where an attribute is determined by another attribute in a table that is not the primary key

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

What are the conditions for 3NF
a

A
  • Must already be in second normal form
  • Must have no non-key dependencies
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

How do you find non-key dependencies
a

A

Ask yourself:
“Is it ever possible for two records to have the same value in this field?”.

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

How do you fix non-key dependencies for n non-key dependencies

A
  • Make n new tables, and for each one you should contain the non key dependency attributes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly