Skip to main content
Institute of Advanced Technological and Commercial Studies

Resources

Relational databases in practice

A relational database stores information so that no fact is written twice and every question can be answered in one query. Both properties are designed in, and they explain most of the slowness observed later.

What the relational model guarantees

Each fact is written in exactly one place, and the links between tables reconstruct the whole on demand. A customer address stored once is corrected once; repeated on every order, it produces as many versions as there are rows. Normalisation organises that uniqueness, foreign keys have the engine itself enforce it, and transactions guarantee that a partial write never leaves the database in an inconsistent state.

  • One table per kind of object, one row per real occurrence
  • A primary key identifying each row unambiguously
  • Foreign keys having the engine enforce the links
  • Transactions making a write complete or absent
  • Indexes placed on the columns your queries filter on

Designing a database in five decisions

  1. 01

    Name the business objects

    Customer, order, item, delivery: each business noun becomes a table, and the conversation with users stays possible.

  2. 02

    Choose the identifiers

    A stable key, never an attribute that changes. A phone number identifies a person poorly over ten years.

  3. 03

    Set the links

    One-to-many, many-to-many through a junction table. Cardinalities are decided with the business, not afterwards.

  4. 04

    Write the expected queries

    The questions the database will serve shape the model. A query you cannot write signals a missing link.

  5. 05

    Measure before optimising

    The execution plan says where the time goes. You then add the useful index, and only that one.

Where this skill is acquired in the catalogue

Three programmes approach databases from three angles: building them, querying them to decide, industrialising them at scale. The taught volumes indicate the depth of each.

ProgrammeLevelDurationCredits and hoursFees
Computer Science programme — Bac+3 levelBachelor's degree3 years180 credits · 1800 h5 400 000 GNF per year
Business Intelligence and SteeringBachelor's degree2 years120 credits · 1200 h5 000 000 GNF per year
Data Science programme — Bac+5 levelMaster's degree2 years120 credits · 1200 h7 200 000 GNF per year

Frequent questions

Do I need SQL before starting?

The language is learned inside the block itself, starting from the simplest queries. What matters on entry is being comfortable with a spreadsheet: the notions of row, column and filter are already there.

When does a database become slow?

When a query scans a whole table to find a few rows. The execution plan shows it immediately, and the right index restores the response time. It is a diagnosis taught on real databases, with real volumes.

How do I choose between a new table and an extra column?

A new table is called for as soon as a value can repeat or carry its own attributes: a customer has several addresses, each with its city and status. A column suits a single atomic property of the object.

Relational databases in practice — Resources | IHETC — IHETC