🚧 Under construction — VoTechWorks is being built. A free tech program — complimentary, as our commitment to get America working.
voTechWorksGrade 13 · a vocational technology learning center, by urbanicity
newSchoolWorks.com › VoTechWorks › Technology & Design › Data Management / Database Administration › Relational Design & Normalization › Lesson 1
TEC-DATA86-02 · Lesson 1 · 10 clock hours · theory

Foundations of the Relational Model

Objective. Students will accurately describe the core concepts of the relational model—relations, tuples, attributes, domains, and keys—and explain how they differ from flat-file storage.

⚠ Pending professional review

This lesson, its worked examples and its practice questions has not yet been verified by an industry-certified professional or by a certification or approval body. It is a study draft and may contain errors. Do not use it as instructions for work on a job site or on live equipment. Always follow your instructor, your supervising professional, and current official references and regulations.

VoTechWorks program approval and accreditation are still in progress. Credentials are issued only by the certifying bodies named in each program, after their own exams.

What Is the Relational Model?

The relational model was introduced by E. F. Codd in his landmark 1970 paper, "A Relational Model of Data for Large Shared Data Banks." Before this model existed, data was stored in hierarchical or network structures that required programmers to navigate physical storage paths by hand. Codd's insight was that data should be described by its logical content, not by how it is physically arranged on disk. That separation—logical structure from physical storage—remains the foundation of every modern relational database system, including PostgreSQL, Oracle Database, and Microsoft SQL Server.

Relations, Tuples, and Attributes

In the relational model, data is organized into relations. A relation is formally a two-dimensional table made up of rows and columns, but the term carries precise meaning beyond a simple spreadsheet grid.

Domains

Every attribute draws its values from a domain—the complete set of permitted values for that attribute. A domain can be a standard data type such as integer, date, or character string of a fixed length, or it can be a more constrained set defined by a business rule. For example, the domain of a `ship_state` attribute might be restricted to the fifty US state abbreviations. Domains enforce data integrity at the most basic level: a phone number column should never hold a negative integer.

Null is a special marker meaning "value unknown or not applicable." Nulls are distinct from zero or an empty string. Relational systems handle nulls carefully because they complicate comparisons and aggregate calculations.

Keys: Candidate, Primary, and Surrogate

A candidate key is any minimal set of one or more attributes whose combined values uniquely identify every tuple in a relation. "Minimal" means you cannot remove any attribute from the set and still guarantee uniqueness. A relation may have more than one candidate key.

A primary key is the candidate key the database designer selects as the official identifier for tuples in that relation. Primary key values must be unique and must never be null—this rule is called the entity integrity constraint.

A surrogate key is an artificial identifier—usually a system-generated integer or UUID—added to a relation when no natural attribute or combination of attributes makes a reliable primary key. Surrogate keys have no business meaning; they exist solely to serve as a stable, compact row identifier. Many practitioners prefer surrogate keys because natural keys (such as a Social Security number or a product code) can change over time or contain sensitive information.

How Relations Differ from Flat-File Storage

A flat file—such as a CSV spreadsheet—stores all related information in a single table with no enforced structure. Consider a CSV that stores customer orders. Each row might repeat the customer's name, address, and phone number for every order that customer places. This creates three well-known problems:

1. Insertion anomaly: You cannot record a customer who has placed no orders yet, because every row requires order data.

2. Update anomaly: If a customer moves, you must update every row containing that customer's address. Missing even one row leaves the data inconsistent.

3. Deletion anomaly: If you delete the only order for a particular customer, you lose the customer's contact information entirely.

The relational model solves these problems by splitting data into separate relations—one for customers, one for orders—and linking them through foreign keys. A foreign key is an attribute in one relation whose values correspond to the primary key of another relation. This enforces referential integrity: you cannot have an order that points to a non-existent customer.

Data Integrity and Professional Responsibility

Database administrators bear direct responsibility for the accuracy and availability of data that organizations depend on. Errors in schema design—such as missing key constraints or incorrect domains—can propagate silently into business decisions, financial reports, or even safety-critical records. Always apply constraints at the database level rather than relying on application code alone; applications change, but the database outlasts any single application.

When working with systems that store personal or regulated data, be aware that your design choices have privacy and compliance implications. Attribute-level domains, key constraints, and careful normalization are not abstract academic exercises—they are the first line of defense against data corruption.

Summary

The relational model organizes data into relations composed of tuples and attributes. Each attribute is governed by a domain that restricts acceptable values. Keys—candidate, primary, and surrogate—uniquely identify tuples and enforce entity integrity. Compared to flat-file storage, the relational model eliminates insertion, update, and deletion anomalies by separating entities into distinct relations linked by foreign keys. These concepts underpin every topic in this course and every credential exam you will sit.

Key terms8

RelationA two-dimensional table in the relational model, consisting of a defined set of attributes (columns) and a set of tuples (rows); the fundamental data structure in relational databases.
TupleA single row in a relation, representing one instance of the entity described by that relation; order among tuples is not significant.
AttributeA named column in a relation that describes one property of the entity; each attribute draws its values from a specific domain.
DomainThe complete set of permitted values for an attribute, defined by a data type and any additional business constraints; enforces basic data integrity.
Candidate KeyA minimal set of one or more attributes that uniquely identifies every tuple in a relation; a relation may have more than one candidate key.
Primary KeyThe candidate key chosen as the official unique identifier for tuples in a relation; values must be unique and non-null (entity integrity constraint).
Surrogate KeyAn artificial, system-generated identifier (such as an auto-incremented integer) added to a relation when no natural attribute makes a reliable primary key; carries no business meaning.
Update AnomalyAn inconsistency that arises in flat-file storage when the same fact is stored in multiple rows and only some rows are updated, leaving contradictory data in the table.
In class: Lecture and annotated reading: students read selected sections of a standard database textbook (e.g., Ramakrishnan & Gehrke, 'Database Management Systems') covering Codd's relational model, then annotate key terms in a shared glossary document. · Compare-and-contrast exercise: students receive a flat CSV file of customer orders and a two-table relational version; they list every duplicate value, identify update anomalies in the flat file, and present findings to the class. · Concept-mapping quiz: students individually draw a labeled diagram connecting the terms relation, tuple, attribute, domain, candidate key, primary key, and surrogate key, and submit it for instructor review.
Materials: Whiteboard, projector, database textbook, sample CSV order file, blank concept-map templates, spreadsheet software
Check: Instructor reviews concept maps; students must correctly define all seven terms and correctly identify at least two anomalies in the flat-file exercise. Pass: 70% accuracy on a 10-question vocabulary check.

Practice check8

Answer each question, then check it. Nothing is recorded; this is your own practice.

Relational model fundamentals — tested across DAMA CDMP Associate and general database theory sections of Oracle DBA CA and Microsoft DP-300
1. Which term describes a single row in a relation that represents one instance of the entity being stored?
Data integrity and relational model — DAMA CDMP Associate; PostgreSQL CE constraint concepts
2. A database designer defines a column `ship_state` so that it only accepts valid two-letter US state abbreviations. What relational concept does this restriction represent?
Relational model and normalization — Oracle DBA CA; DAMA CDMP Associate
3. Which property distinguishes a candidate key from any other set of attributes that happens to have unique values in a relation?
Flat-file vs. relational design — DAMA CDMP Associate; database design fundamentals
4. A flat CSV file stores each order together with the customer's full address. When the customer moves, only some rows are updated. What kind of anomaly has occurred?
Anomalies and normalization motivation — DAMA CDMP Associate; Microsoft DP-300 design concepts
5. A company cannot add a new supplier to its database until that supplier has at least one purchase order on record. This is an example of which type of anomaly in flat-file storage?
Key types and schema design — PostgreSQL CE; Oracle DBA CA; Microsoft DP-300
6. An online retailer's product table uses a system-generated integer column `product_id` as its identifier because product codes supplied by vendors change over time. What type of key is `product_id`?
Integrity constraints — Oracle DBA CA; PostgreSQL CE; Microsoft DP-300
7. According to the entity integrity constraint, which of the following is true of a primary key?
History and theory of relational model — DAMA CDMP Associate; foundational database concepts
8. Which of the following most accurately describes the central contribution of Codd's relational model compared to earlier hierarchical data storage approaches?
Record this lesson on my transcript. Sign in with your key and enrollment email to record lessons (enroll free if you have no key). This page stays open to read and practise.