Choose your database lens
The right lens makes the design decision visible.
Database reports can turn on the model, the structure, the physical design, the query behaviour, the concurrency, the recovery, the security or the governance. Identifying which of these eight areas is actually holding the report back is usually faster than adding another table.
↗
Data requirements, modelling and conceptual design
Examine eliciting data requirements from the users and the existing records, entities, attributes, relationships and cardinality, the difference between conceptual, logical and physical design, entity relationship modelling with its notation and its limits, primary, alternate and surrogate keys, referential integrity, and expressing business rules as constraints, and the cost of getting the model wrong before a single table exists.
◎
Relational design, keys and constraints
Work with relations, tuples, attributes and domains, primary, foreign, alternate, composite and surrogate keys, entity, referential, check, uniqueness and not-null constraints, default values, choosing the primary key from the candidate keys, and the crucial difference between a rule the database enforces and a rule the application code merely hopes holds.
✦
Normalisation, denormalisation and the trade-off
Study functional dependency, candidate keys and the normal forms, the insertion, deletion and update anomalies, lossless join and dependency preservation, when denormalisation is genuinely justified, how to measure whether the extra joins are a real read cost or an imagined one, and how to maintain consistency once the same fact is stored twice.
◌
Physical design, storage and indexing
Examine how files, pages, records and tuples are laid out on disk, clustered and non-clustered indexes, hash and tree indexes, composite key order and selectivity, reading a query plan, join methods, buffering and caching, partitioning and its effect on maintenance, and the difference between an index that earns its place and one that only adds cost to every write.
↗
Querying, views, procedures and transactions
Work with the structured query language against the relational algebra, joins and anti-joins, subqueries, common table expressions, aggregate and window functions, views and what they conceal, stored procedures and their trade-offs, cursors versus set-based work, the four properties of a transaction, isolation levels and the anomalies each one permits, locking, deadlocks and optimistic alternatives.
◎
Concurrency, recovery and system internals
Examine the storage manager, the query processor and how a plan is chosen, the buffer manager, the transaction manager, write-ahead logging, checkpoints, the recovery manager, backup and restore, media failure and human failure, availability targets, and what actually happens to your data when the process is killed midway through a write.
✦
Administration, security and store comparison
Study users, roles and least privilege, authentication and authorisation, encryption at rest and in transit, auditing of access, backup and restore rehearsal, capacity planning and growth, and the comparison with document, key-value, column-family and graph stores, including an honest account of when a relational design is the wrong choice.
✓
Data quality, governance, privacy and modern practice
Examine master and reference data, the dimensions of data quality, lineage and provenance, retention and secure disposal, privacy and data protection duties, the impact of an analytics pipeline on the operational store, distributed and cloud databases, warehousing alongside operational databases, and the professional and academic duties that come with holding other people's data.