What is normalisation?
improving the efficiency of relational models through minimising redundancy.
creating easier access to users to maintain data
takes up minimal storage
List relational keys.
quickly describe each relational key
define dependency
essentially, an attribute or set of attributes is reliant on another
What is a functional dependency?
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
describe full functional dependency
e.g. staffAddress has a functional dependency on (staffNo, staffName), but a full functional dependency between staffNo
describe Transitive dependency
there is a transitive dependency between staffNo and bAddress by virtue of branchAddress.
describe Partial dependency
so C is partially dependent on AB.
studentNo, subjectCode determines subjectName and Grade. but subjectName is partially dependent on subjectCode
describe Multi-valued dependency
ISBN is dependent to subjectCode
and
LectureID is dependent on subjectCode
List the goals of normalisation
What is redundancy?
the major aim of relational database design is to group attributes into relations to minimise data redundancy
List three ways to update anonmalies
List the normal forms list
explain 0NF
a relation that contains one more repeating groups (unnormalised form)
explain 1NF
a relation where each row and column contains one and only one value
explain 2NF
a relation that is in 1NF, and every non-PK are fully functionally dependent on the PK
explain 3NF
A relation in 1NF and 2NF, where no “non PK” attribute is transitively dependent on the PK
explain BCNF
a relation that is in 3NF and every determinant is a candidate key
explain 4NF
a relation that is in BCNF and does not contain nontrivial multi-valued dependencies
what does the term “decomposition” mean?
the process of breaking one table into multiple tables.
what are two objectives for decomposition?
enables us to enforce a constraint
on the original relation by enforcing some constraint on each of the
smaller relations.
Give an example of lossless-join and dependency preserved
Students (StudentNo, Name, Address, DOB, GPA):
StudentsProfile(StudentNo, Name, Address, DOB)
StudentsAcademic(StudentNo, GPA)
what does BCNF stand for?
boyce codd normal form
explain BCNF
a relation is in BCNF, of and only if, every determinant is a candidate key (pretty much fully functional dependency is in the table)