Lecture 5 Revision

MVC – Creating CRUD Applications

Base Template View

Base Template

alt text

alt text

Create Read Update Delete (CRUD)

E.g. Customer app

Need an:

Example

alt text

Designing a Database

First Normal Form

alt text

Second Normal Form

alt text

Third normal form

alt text

Normalisation Overview

Form Description
1NF Outcome: Identifying non-atomic values from relations.
Test: Relation should have no multivalued attributes or nested relations.
2NF Outcome: Identifying partial dependencies, which helps remove some anomalies. Test: LHS of any non-trivial FD in F+ is not a proper subset of a candidate key, or RHS is a prime attribute
3NF Outcome: Identifying partial and transitive dependencies, which helps remove most anomalies Test: LHS of any non-trivial FD in F+ is a superkey, or RHS is a prime attribute.
BCNF Outcome: Identifying all anomalies at the cost of not preserving all FDsTest: LHS of any non-trivial FD in F+ is a superkey.