Transaction processing system consists of a TP monitor, databases, and transactions: System Requirements: High; Availability, Reliability, Throughput, low response time, long lifetime, security Normalisation: • A normal form (NF) is a condition on a schema (guaranteeing certain desirable properties — relating to redundancy). • 1NF: ≈ the definition of the Relational Model (relation = set of tuples; tuple = series of atomic values) • 2NF: scientific accident, not useful. • 3NF: always preserves FD (4NF & BCNF sometimes don’t) (zie definitie hier rechts ) • 4NF: verderop beschreven • BCNF (Boyce-Codd Normal Form): the schema has no unavoidable or trivial FDs, that is, in each FD in the schema, the lefths is a superkey or includes the righths. Hence, if a schema is in BCNF, then there is no redundancy-caused-by-FDs. • Definition: X Y is trivial if: Y isSubset X (alle “elementen” uit Y zitten ook in X). X Y is unavoidable if: X is superkey (or key). (private terminology) Denormalisation: • Normalisation helps maintain consistency (no anomalies) and save space, but performance might suffer because data is distributed over multiple rel’ns. • Tradeoff: judiciously introduce redundancy to improve performance. • Example. Recall the BCNF schema for the student registration system: Student(StudId,Name,...), Transcript(StudId,...,Grade), . . . Alas, “getting names and grades” needs a (costly!) join. Adding Name to Transcript introduces redundancy and eliminates the join: Student(StudId,Name,...), Transcript(StudId,Name,...,Grade), . . • With many queries and few updates, added redundancy improves performance. Decomposition: • r isSubset r1 UNION r2 is always true r1 UNION r2 isSubset may sometimes fail. • Theorem. The decomposition is lossless (“always r = r1 UNION r2”) iff the common attributes form a key for either of the components: Y X or Y Z is in F + . C D betekent C isSubset D Betekent isIn Axiom = vanzelfsprekendheid De aanduiding covering betekent: altijd is een unilid ook prof of student of beide (nooit null). De aanduiding disjunct betekent: nooit is een unilid zowel prof als ook student ((=XOR)(disjunct kan ook null zijn)).