Lecture 4B: Normalisation Flashcards

1
Q

What is normalisation?

A

improving the efficiency of relational models through minimising redundancy.

creating easier access to users to maintain data
takes up minimal storage

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

List relational keys.

A
  1. superkey
  2. candidate key
  3. primary key
  4. foreign key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

quickly describe each relational key

A
  1. a superkey is an attribute, or a set of attributes that uniquely identify a tuple within a relation
  2. a CK, is a column, or set of columns, in a table that can uniquely identify any database record without referring to any other data.
  3. The PK is the candidate key that is selected to uniquely identify rows in a table
  4. a FK, is the attribute or set of attributes in table that matches the ck/pk
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

define dependency

A

essentially, an attribute or set of attributes is reliant on another

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

What is a functional dependency?

A

In a given table, an attribute (B) is said to be dependent on a set of attributes (A) if and only if each A value is associated with precisely one B value.

e.g. staffNo functionally determines position, but position does not functionally determine staffNo

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

describe full functional dependency

A

e.g. staffAddress has a functional dependency on (staffNo, staffName), but a full functional dependency between staffNo

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

describe Transitive dependency

A

there is a transitive dependency between staffNo and bAddress by virtue of branchAddress.

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

describe Partial dependency

A

so C is partially dependent on AB.

studentNo, subjectCode determines subjectName and Grade. but subjectName is partially dependent on subjectCode

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

describe Multi-valued dependency

A

ISBN is dependent to subjectCode
and
LectureID is dependent on subjectCode

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

List the goals of normalisation

A
  1. free the collection of tables from undesirable insertion, update, deletion dependencies
  2. reduce the need to restructure relations when new data types are introduced
  3. make relational model more informative to users
  4. make the collection of relations neutral to the query bias
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is redundancy?

A

the major aim of relational database design is to group attributes into relations to minimise data redundancy

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

List three ways to update anonmalies

A
  1. insertion
  2. deletion
  3. modification
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

List the normal forms list

A
  1. UNF/0NF
  2. 1NF
  3. 2NF
  4. 3NF
  5. BCNF
  6. 4NF
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

explain 0NF

A

a relation that contains one more repeating groups (unnormalised form)

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

explain 1NF

A

a relation where each row and column contains one and only one value

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

explain 2NF

A

a relation that is in 1NF, and every non-PK are fully functionally dependent on the PK

17
Q

explain 3NF

A

A relation in 1NF and 2NF, where no “non PK” attribute is transitively dependent on the PK

18
Q

explain BCNF

A

a relation that is in 3NF and every determinant is a candidate key

19
Q

explain 4NF

A

a relation that is in BCNF and does not contain nontrivial multi-valued dependencies

20
Q

what does the term “decomposition” mean?

A

the process of breaking one table into multiple tables.

21
Q

what are two objectives for decomposition?

A
  1. lossless-join decomposition:
    enables us to find any instance of the
    original relation from corresponding instances in the smaller
    relations.
  2. Dependency preservation:

enables us to enforce a constraint
on the original relation by enforcing some constraint on each of the
smaller relations.

22
Q

Give an example of lossless-join and dependency preserved

A

Students (StudentNo, Name, Address, DOB, GPA):

StudentsProfile(StudentNo, Name, Address, DOB)

StudentsAcademic(StudentNo, GPA)

23
Q

what does BCNF stand for?

A

boyce codd normal form

24
Q

explain BCNF

A

a relation is in BCNF, of and only if, every determinant is a candidate key (pretty much fully functional dependency is in the table)