Database Terminology: Tables, Records & Field Data Types

A table holds records of the same kind. A record is one row; a field is a named category of information represented by a column. Consistent field names and appropriate types make data easier to query and validate.

Worked single-table design

A lending club needs MemberID, Name, PostalCode, BooksBorrowed and FeesPaid. MemberID identifies one record. Name and PostalCode use text: a postal code can contain letters and leading zeroes, so it is not a quantity for arithmetic. BooksBorrowed is an integer. FeesPaid is Boolean.

Other useful types include real for fractional numbers, date/time for dates or times, and character for a single character. Select types according to use, not just whether a sample contains digits.

Independent design

Design a single table for equipment loans, with one record per loan. Choose fields for the borrower, item, loan date and return status. Name a unique key and justify each type. A well-designed relational database can reduce duplication; it does not automatically eliminate duplicate facts or update problems.

AI Socratic Tutor

All-Access
Sign in or create an account. AI Tutor is an All-Access benefit.
Sign Up

Need guidance? Ask a question or use the hint below.

AI Socratic Tutor is an All-Access Benefit

Unlock step-by-step Socratic hints, algorithm trace table walkthroughs, and error diagnostics for every Cambridge exercise.

You're chatting with an AI tutor, not a person. AI can make mistakes, so double-check its answers.

Independent Practice: Design fields

+30 XP

Independent Practice: Design fields

  1. A postal code may contain letters and leading zeroes. Choose TEXT or INTEGER: [Space 1]
  2. A whole number of borrowed books uses INTEGER or BOOLEAN? [Space 2]
  3. A paid/not-paid flag uses BOOLEAN or TEXT? [Space 3]
Word Bank / Available Cards (Drag into spaces or tap to place)
All-Access Required

Interactive exercises for Module 2 and beyond require an active plan.