• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 1 fuera de 3 páginas
Resumen

Summary Databases: Relational Model, SQL, Normalisation and Transactions

Document preview thumbnail
Vista previa 1 fuera de 3 páginas

Revision summary for a second-year Databases module, covering the relational model and integrity constraints, SQL and relational algebra including the logical evaluation order that explains most query errors, functional dependencies and normalisation from 1NF to BCNF with the lossless join test, and transactions with ACID, isolation anomalies and indexing. Every definition is stated in the form a marker expects, and the worked details focus on the common failures - NOT IN with nulls, outer joins collapsed by WHERE, phantom reads, and indexes made unusable by a function on the column. Includes a normal form table, four practice questions with checkpoints, a glossary and a revision plan.

Vista previa del contenido

Databases: Relational Model, SQL, Normalisation and
Transactions
The definitions, normal forms and transaction properties that exam questions test
Computer Science | Undergraduate (Level 5) | December 2026


WHAT IS INSIDE

1. The relational model
2. SQL and relational algebra
3. Functional dependencies and normalisation
4. Transactions, concurrency and indexes
Exam question patterns
Glossary of exam-ready definitions


1. The relational model
A relation is a set of tuples over a schema of named, typed attributes; because it is a set, duplicate tuples are
impossible and tuple order carries no meaning. A superkey uniquely identifies a tuple, a candidate key is a
minimal superkey, and the primary key is the candidate key chosen for identification. A foreign key
references a candidate key in another relation and enforces referential integrity: its value must exist there or be
null where permitted.
Integrity constraints are declared, not assumed: entity integrity forbids null primary keys, referential integrity
forbids dangling references, and domain constraints restrict values to their type. The important exam distinction
is between the schema (the stable structure) and the instance (the current data), because constraints are stated
on the schema and evaluated on the instance. Relational design also explains why a table without a declared key
is not a relation in the formal sense, however it looks in a spreadsheet.
• Degree and cardinality - degree is the number of attributes, cardinality the number of tuples.
• Null - unknown, not applicable or withheld; comparisons with null yield unknown, never true.
• Referential action - restrict, cascade or set null defines what happens on deletion of a referenced row.
• View - a stored query; a materialised view trades storage and staleness for read speed.

2. SQL and relational algebra
Relational algebra is the formal basis: selection filters rows, projection chooses columns, cartesian product
pairs rows, join pairs rows matching on a condition, and set operations combine compatible relations. SQL
adds duplicate retention, ordering and aggregation, so a SQL query is not identical to an algebraic expression
until duplicates are removed. Exam questions typically ask you to translate between the two; translate
projection last, because the algebra collapses duplicates on projection while SQL does not without DISTINCT.
The clauses are evaluated in a fixed logical order: FROM, WHERE, GROUP BY, HAVING, SELECT,
ORDER BY. That order explains why an alias defined in SELECT cannot be used in WHERE, and why
filtering an aggregate needs HAVING rather than WHERE. Outer joins preserve unmatched rows with nulls,
and the classic error is turning an outer join back into an inner one by testing a column of the optional side in
WHERE instead of in the join condition.
• Aggregate functions - COUNT, SUM, AVG, MIN, MAX; COUNT(*) counts rows while COUNT(column)
ignores nulls.
• Subquery forms - scalar, IN, EXISTS and correlated; EXISTS stops at the first match, which matters for
performance.


Databases: Relational Model, SQL, Normalisation and Transact Page 1 of 3

Información del documento

Estudio
Desconocido
Subido en
1 de diciembre de 2026
Número de páginas
3
Escrito en
2026/2027
Tipo
Resumen
$7.98

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Vendido
0
Seguidores
0
Artículos
225
Última venta
-



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes