The whole, before the parts

Data modeling describes what facts a system stores and how they relate. Databases organize those facts and provide controlled ways to read and change them. Citation needed

For example, an order system needs to distinguish customers and orders, connect each order to the right customer, and save related changes consistently. Citation needed

The concepts move from the things represented, to their identifiers, to groups of changes handled as one operation. The organizing question is how the stored facts remain meaningful as the application reads and changes them. Citation needed

Terminology and core concepts

  1. Entity

    An entity is a distinguishable thing represented in a data model. Citation needed

    What might one customer record represent?
    one customer entity Citation needed
  2. Key

    A key identifies a record within a table or collection. Citation needed

    Why must a chosen unique key distinguish records?
    so a reference identifies the intended record Citation needed
  3. Transaction

    A transaction groups operations into a controlled unit of work. Citation needed

    Why group a debit and matching credit in one transaction?
    to avoid recording only half the transfer Citation needed

Try an example

An order refers to a customer that does not exist. Which kind of database rule could prevent this? Citation needed

Show the reasoning

A foreign-key constraint can require the referenced customer to exist. The rule protects a relationship rather than merely the format of a field.

Citation needed

Sources and further reading

Core notes reviewed .

Learning path

Continue through Software Engineering in order, using the concepts above to connect this topic to the next.