Relational database structure

Relational database structure

Published September 28, 2026

Relational database structure

On this page

Purpose of relational database structure

A relational database organizes related data into tables so people and systems can store, find, update, and link records without losing meaning. Its structure prevents invalid records, documents each field, and reduces repeated data that could become inconsistent. This objective sits in ISC Area II, Group B, Data management, with prompts about table parts, keys, integrity rules, metadata, and normal forms.

The data life cycle describes what happens to data over time. Warehouses, lakes, marts and schemas describes larger storage designs. Relational database structure explains the table-level design inside a relational system.

The first two chapters describe data movement and storage environments. This chapter explains the internal structure used when data is kept in related tables. The five parts below solve different problems, so they must stay distinct.

Five parts of relational database structure

The diagram gives the whole structure before the details. Tables hold the data, keys connect it, integrity rules protect it, the data dictionary describes it, and normalization improves its design. The arrows show parts of the structure, not time or a decision.

Loading diagram…

The table that follows defines each label and gives the clue words that identify it. A relation is a table, a tuple is a row or record, and an attribute is a column or field.

Tables, keys and design rules

PartWhat it asks or coversClue words in a scenario
Tables, relationA table represents a relation, or set of records about an entity or relationship.table, relation, entity, records
Tables, row or recordEach row or tuple represents one occurrence of the table's subject.one customer, one order, one row per
Tables, column or attributeEach column or attribute stores one defined kind of value.field, attribute, column, value
Keys, candidate keyA minimal column or column set uniquely identifies a row.minimal, uniquely identifies, alternate
Keys, primary keyThe selected candidate key identifies each row and cannot contain duplicates or NULL values.primary key, unique identifier, duplicate, NULL
Keys, foreign keyA column or column set refers to a key in another table and supports a relationship.references, parent, child, matching ID, orphan
Keys, table relationshipThe key link describes how rows in related tables correspond, such as one-to-many.related tables, parent and child, one-to-many
Integrity, entity integrityThe primary key must uniquely identify each row, and its key columns cannot be NULL.duplicate primary key, missing identifier, NULL key
Integrity, referential integrityA foreign key must match an existing referenced key or be NULL when allowed.match existing, referenced table, orphan, foreign key
Integrity, domain integrityA value must meet the field's type, allowed set, format, range, and nullability rules.valid type, allowed value, format, range, required
Data dictionaryA metadata catalog defines each data element and its business and technical properties.definition, data type, field name, owner, catalog, metadata
Normalization, 1NFEvery cell contains one atomic value, and there are no repeating groups.comma-separated values, repeating columns, atomic
Normalization, 2NF1NF plus no non-key attribute depends on only part of a composite candidate key.composite key, partial dependency, depends on one key column
Normalization, 3NF2NF plus no non-key attribute depends on another non-key attribute.transitive dependency, non-key determines non-key, indirect dependency

A candidate key is a minimal column or column set that uniquely identifies a row. The selected candidate key is the primary key. An unselected candidate key is an alternate key.

A foreign key refers to a primary key or another candidate key in a related table. This creates relationships such as one-to-many relationships.

The three integrity rules state which values are acceptable in those locations.

  • Entity integrity requires the chosen primary key to identify each row uniquely.
  • The primary-key columns cannot be NULL.
  • Referential integrity requires a foreign-key value to match an existing referenced key.
  • A foreign key may be NULL when the relationship permits NULL.
  • Domain integrity requires compliance with the data type, allowed values, format, range, and nullability.

A data dictionary is a catalog of metadata, not the business records themselves. It can document these properties:

  • Field name.
  • Business definition.
  • Table.
  • Data type.
  • Format or size when relevant.
  • Allowed values or range when relevant.
  • Nullability.
  • Key status.
  • Constraints.
  • Owner.
  • Source.

Normalization organizes tables around dependencies. It reduces repeated data and insertion, update, and deletion anomalies.

  • 1NF requires one atomic value in each cell and no repeating groups.
  • 2NF requires 1NF plus dependence on the whole candidate key.
  • 3NF requires 2NF plus no dependence on another non-key attribute.
  • In 3NF, non-key attributes depend on the key, the whole key, and nothing but the key.

A single-column key has no partial-key problem for 2NF. It still requires a check for transitive dependencies under 3NF. A valid domain range or set comes from the field's definition, so no universal numeric threshold applies.

Recognizing database structure clues

The clue words in each scenario point to a structure part rather than to a calculation. Each distractor belongs to the same relational database structure.

Practice

A Customer table stores one row for each customer. Its columns are CustomerID, CustomerName, and Email, and each cell holds one value. Which part of relational database structure is described?

An Orders.CustomerID value must match an existing Customers.CustomerID value; otherwise the database rejects the row. Which rule is this?

A catalog lists CustomerID as an integer, defines it as the unique customer identifier, marks it as required and primary key, and names the table where it is used. Which part stores this information?

OrderLine has the composite key (OrderID, ProductID), and ProductName depends only on ProductID. Separating ProductName into a Product table addresses 2NF.

These distinctions identify where data lives, how it links, what values are allowed, what fields mean, and how dependencies shape table design.

Tables, keys, integrity, metadata and normalization

  • Tables hold rows or records made from columns or attributes.
  • Keys and relationships identify rows and connect related tables through primary and foreign keys.
  • Integrity rules protect entity identity, valid field values, and valid table links.
  • A data dictionary records the meaning and technical properties of each data element.
  • Normalization uses 1NF, 2NF, and 3NF to remove repeating groups, partial dependencies, and transitive dependencies.

Unlock the full lesson and continue reading

Signup to continue reading this lesson and unlimited access questions, flashcards, AI notes, and more

Scan to download app

Scan to download
UNLOCK FREE ACCESS

Practice Questions: Relational database structure

  1. 1. An entity must be able to determine which approved vendor bank account was in effect when each electronic payment was released. The current vendor table overwrites the prior bank account whenever a change is approved. Which database design best supports this requirement?

    • A. Store immutable bank-account history records with effective dates and reference the applicable record from each payment
    • B. Continue overwriting the vendor record and retain monthly copies of the entire vendor table
    • C. Store the current bank-account number in each invoice record when the invoice is entered
    • D. Add an index to the bank-account field in the existing vendor master table
    Show answer

    Answer: A. Store immutable bank-account history records with effective dates and reference the applicable record from each payment

    Store immutable bank-account history records with effective dates and reference the applicable record from each payment - Effective-dated history preserves each approved bank account instead of overwriting prior values. - A payment’s reference to the applicable immutable record identifies the approved account in effect when that payment was released. Continue overwriting the vendor record and retain monthly copies of the entire vendor table - Monthly copies can miss bank-account changes approved between snapshots. - Because the live vendor record still overwrites prior values, a snapshot may not identify the account in effect at a particular payment’s release. Store the current bank-account number in each invoice record when the invoice is entered - Invoice entry may precede a bank-account change approved before payment release. - The invoice’s stored number therefore does not establish which approved account was in effect when the payment was released. Add an index to the bank-account field in the existing vendor master table - An index speeds access to stored bank-account values but does not retain values the vendor table overwrites. - Without historical account records, the indexed table cannot establish which approved account was in effect at payment release.

  2. 2. A normalized purchasing database must record that each product may be supplied by several suppliers and each supplier may provide several products. The database must also store the negotiated unit price for each product-supplier combination. Which table design is most appropriate?

    • A. A ProductSupplier table keyed by ProductID and SupplierID, with negotiated unit price
    • B. A Product table keyed by ProductID, with one SupplierID and negotiated unit price
    • C. A Supplier table keyed by SupplierID, with one ProductID and negotiated unit price
    • D. A PurchaseOrder table keyed by PurchaseOrderID, with the current negotiated unit price
    Show answer

    Answer: A. A ProductSupplier table keyed by ProductID and SupplierID, with negotiated unit price

    A ProductSupplier table keyed by ProductID and SupplierID, with negotiated unit price - The ProductID–SupplierID key uniquely identifies each pairing in the many-to-many relationship. - Negotiated unit price belongs in that table because it depends on the combination, not on either product or supplier alone. A Product table keyed by ProductID, with one SupplierID and negotiated unit price - One SupplierID per product cannot represent a product supplied by several suppliers. - The price could differ by supplier, so storing it on the Product row would not represent each negotiated pairing. A Supplier table keyed by SupplierID, with one ProductID and negotiated unit price - One ProductID per supplier cannot represent a supplier providing several products. - The price could differ by product, so storing it on the Supplier row would not represent each negotiated pairing. A PurchaseOrder table keyed by PurchaseOrderID, with the current negotiated unit price - PurchaseOrderID identifies a transaction, not a unique product-supplier pairing. - A purchase order may record a transaction price, but it is not the appropriate table for maintaining the negotiated price for each pairing.

  3. 3. An employee training table stores EmployeeID, CourseID, CourseTitle, CourseInstructor, CompletionDate, and Score. A course's instructor name therefore appears on hundreds of training rows, and recent updates changed only some of those rows. Which redesign would best prevent this update anomaly while preserving the relationship between courses and training records?

    • A. Store course attributes once in a Course table and retain CourseID as a foreign key in Training
    • B. Move CourseInstructor to each training-detail row and retain CourseID in both training tables
    • C. Use EmployeeID and CourseID as a composite primary key while retaining all course attributes
    • D. Create a view that returns the maximum instructor name found for each course's training records
    Show answer

    Answer: A. Store course attributes once in a Course table and retain CourseID as a foreign key in Training

    Store course attributes once in a Course table and retain CourseID as a foreign key in Training - CourseTitle and CourseInstructor depend on CourseID, so storing them once in Course prevents inconsistent updates across hundreds of training rows. - Keeping CourseID as a foreign key in Training preserves the link between each training record and its course. Move CourseInstructor to each training-detail row and retain CourseID in both training tables - Putting CourseInstructor on each training-detail row repeats the value rather than storing it once per course. - Retaining CourseID in both training tables does not prevent some instructor names from being updated while others remain unchanged. Use EmployeeID and CourseID as a composite primary key while retaining all course attributes - A composite key may identify a training row, but CourseInstructor still depends on CourseID alone. - Retaining course attributes on training rows leaves the same instructor name duplicated and vulnerable to inconsistent updates. Create a view that returns the maximum instructor name found for each course's training records - A view displaying the maximum instructor name does not change the conflicting values stored in the training table. - Choosing one name for reporting does not establish which instructor name is authoritative or prevent future inconsistent updates.

  4. 4. A relational accounting database stores an Account table and a JournalEntryLine table whose AccountID field references the Account table. Management wants users to deactivate obsolete accounts while preserving historical journal-entry relationships. Which database design best satisfies this objective?

    • A. Move obsolete accounts to a spreadsheet and reuse their AccountID values
    • B. Add an active-status field and restrict deletion of referenced accounts
    • C. Delete obsolete accounts and set related journal AccountID values to null
    • D. Delete obsolete accounts and cascade the deletion to journal-entry lines
    Show answer

    Answer: B. Add an active-status field and restrict deletion of referenced accounts

    Add an active-status field and restrict deletion of referenced accounts - An active-status field lets users deactivate obsolete accounts without removing them from the Account table. - Restricting deletion of referenced accounts preserves the AccountID relationship to historical JournalEntryLine records. Delete obsolete accounts and set related journal AccountID values to null - Setting historical journal lines’ AccountID to null severs their link to the accounts used when the entries were recorded. - Although the lines remain, users can no longer identify their accounts through the database relationship. Delete obsolete accounts and cascade the deletion to journal-entry lines - Cascading deletion removes the JournalEntryLine records that reference each deleted account. - That destroys historical transaction detail rather than preserving the journal-entry relationships management requires. Move obsolete accounts to a spreadsheet and reuse their AccountID values - Moving accounts to a spreadsheet takes their records outside the relational database that holds the journal lines. - Reusing an AccountID could make historical entries appear to belong to a different account.

  5. 5. A payment may be applied to several invoices, and an invoice may be settled through several payments. The PaymentApplication table contains PaymentID, InvoiceID, and AmountApplied. Which database constraint would best prevent the same payment from being applied twice to the same invoice while permitting both types of multiple relationships?

    • A. A unique composite constraint on PaymentID and InvoiceID
    • B. A unique constraint on PaymentID only
    • C. A unique constraint on InvoiceID only
    • D. A unique constraint on AmountApplied only
    Show answer

    Answer: A. A unique composite constraint on PaymentID and InvoiceID

    A unique composite constraint on PaymentID and InvoiceID - The PaymentID–InvoiceID pair identifies one application, so a duplicate pair cannot record the same payment against the same invoice twice. - Either ID can still appear in multiple rows when paired with different IDs, permitting payments across invoices and multiple payments toward an invoice. A unique constraint on PaymentID only - Requiring PaymentID to be unique would prevent one payment from being applied to several invoices. - It would block valid applications even when their InvoiceID values differ. A unique constraint on InvoiceID only - Requiring InvoiceID to be unique would prevent an invoice from being settled through several payments. - It would block valid applications even when their PaymentID values differ. A unique constraint on AmountApplied only - AmountApplied is an amount, not an identifier for a payment–invoice relationship, so its uniqueness would not prevent duplicate ID pairs with different amounts. - It would also reject legitimate applications to different invoices or from different payments that happen to have the same amount.

  6. 6. An accounting database stores products in a Product table and historical invoice lines in an InvoiceLine table. Management must retain all invoice lines, prevent them from referring to nonexistent products, and stop users from selecting discontinued products on new invoices. Which design best meets these requirements?

    • A. Cascade product deletions to invoice lines and retain an active-status field on each invoice.
    • B. Set product identifiers on invoice lines to null when products are deleted and apply a unique index.
    • C. Remove the foreign-key constraint and rely on the invoice-entry application to validate product identifiers.
    • D. Restrict deletion of referenced products and use an inactive-product flag that invoice entry validates.
    Show answer

    Answer: D. Restrict deletion of referenced products and use an inactive-product flag that invoice entry validates.

    Restrict deletion of referenced products and use an inactive-product flag that invoice entry validates. - Restricting deletion of referenced products preserves historical InvoiceLine records and prevents their product identifiers from pointing to nonexistent Product records. - An inactive-product flag lets the products remain in the database while invoice entry blocks users from selecting them on new invoices. Cascade product deletions to invoice lines and retain an active-status field on each invoice. - Cascading deletion would erase historical invoice lines when a referenced product is deleted, violating the retention requirement. - An active-status field on each invoice does not identify which products have been discontinued. Set product identifiers on invoice lines to null when products are deleted and apply a unique index. - Setting product identifiers to null would sever historical invoice lines from the products they record. - A unique index does not preserve those relationships or prevent discontinued products from being selected on new invoices. Remove the foreign-key constraint and rely on the invoice-entry application to validate product identifiers. - Without the foreign-key constraint, the database could accept an InvoiceLine that refers to a nonexistent Product through another process. - Application validation alone does not protect database-level integrity or provide a way to distinguish discontinued products during invoice entry.

  7. 7. An employee-assignment table contains EmployeeID, EmployeeName, ProjectID, ProjectName, and ProjectManager. ProjectName and ProjectManager depend on ProjectID rather than on EmployeeID. If the last employee assigned to a project is removed from the table, all information about that project's name and manager is lost. Which redesign best reduces this deletion-anomaly risk?

    • A. Create a project table keyed by ProjectID and retain ProjectID as a foreign key in the employee table.
    • B. Create a separate employee-name table keyed by EmployeeName and remove EmployeeID from the employee table.
    • C. Retain one table but add ProjectName and ProjectManager to a composite primary key.
    • D. Retain one table and create indexes on ProjectName and ProjectManager.
    Show answer

    Answer: A. Create a project table keyed by ProjectID and retain ProjectID as a foreign key in the employee table.

    Create a project table keyed by ProjectID and retain ProjectID as a foreign key in the employee table. - ProjectName and ProjectManager depend on ProjectID, so a project table stores those attributes independently of employee assignments. - Deleting the last employee assigned to a project then leaves its project record, name, and manager intact. Create a separate employee-name table keyed by EmployeeName and remove EmployeeID from the employee table. - EmployeeName is not established as a unique, stable identifier, so it is not a sound replacement for EmployeeID. - Separating names leaves project information tied to employee rows and does not prevent its loss when the last assignment is deleted. Retain one table but add ProjectName and ProjectManager to a composite primary key. - Adding project attributes to the primary key does not change the fact that they depend on ProjectID. - Their values would still be lost if the last row for a project were deleted. Retain one table and create indexes on ProjectName and ProjectManager. - Indexes can speed searches but do not store project information independently of employee rows. - Deleting the last employee assigned to a project would still delete the only remaining record of its name and manager.

  8. 8. An ERP permits each general ledger account to be assigned to several management-reporting categories, and each reporting category may contain several accounts. Which relational design most appropriately represents these assignments without storing repeating category values in the account table?

    • A. Create an AccountCategory table with AccountID and CategoryID as a composite primary key and as foreign keys to their respective tables.
    • B. Add CategoryID to the Account table as its primary key and retain AccountID as a nonkey descriptive attribute.
    • C. Add AccountID to the Category table as a single foreign key so each category identifies one participating account.
    • D. Store all applicable CategoryID values in one delimited field within each row of the Account table.
    Show answer

    Answer: A. Create an AccountCategory table with AccountID and CategoryID as a composite primary key and as foreign keys to their respective tables.

    Create an AccountCategory table with AccountID and CategoryID as a composite primary key and as foreign keys to their respective tables. - The ERP’s many-to-many relationship requires a separate row for each account–category assignment, rather than repeating categories in the Account table. - The composite primary key prevents duplicate assignments, while the two foreign keys link each row to an existing account and category. Add CategoryID to the Account table as its primary key and retain AccountID as a nonkey descriptive attribute. - Making CategoryID the Account table’s primary key would identify accounts by category, not by AccountID. - A single CategoryID in an account row also cannot represent that account’s assignments to several categories. Add AccountID to the Category table as a single foreign key so each category identifies one participating account. - One AccountID in each Category row permits that category to reference only one account. - The stem requires each reporting category to contain several accounts, so this design does not represent the stated relationship. Store all applicable CategoryID values in one delimited field within each row of the Account table. - A delimited field stores repeating category values in one Account column, contrary to the design requirement. - It also prevents ordinary foreign-key enforcement for each CategoryID and complicates joins and updates to assignments.

Flashcards: Relational database structure

  1. 1. How does a Management Information System (MIS) serve an organization?

    Show answer

    An MIS supports decision-making processes.

  2. 2. What is an Accounting Information System (AIS)?

    Show answer

    An AIS is a specialized MIS designed to process financial transactions.

  3. 3. What is a hash total, and how is it used in input controls?

    Show answer

    A hash total is a sum of nonfinancial data values, such as account or employee numbers, calculated before processing and recomputed afterward to detect missing or altered input records.

Everything you need for CPA prep

Get full Oncourse access with lessons, practice questions, flashcards and AI study tools.

GET STARTED FOR FREE
75% OFFLimited time offer
GET 75% OFF