Concepts / Introduction to Relational Databases

Introduction to Relational Databases

A relational database organizes related data in tables. Each table contains rows and columns, and each intersection of a row and column contains an individual value called a cell.

  • Programming

From Grid to Database

When you first open a database application, its grid-like appearance may seem familiar. It can resemble a spreadsheet with multiple sheets. That resemblance is useful as a starting point, but a relational database is more structured and powerful than a spreadsheet. Its organization is built around three primary data structures: tables, rows, and columns.

Key point

A relational database organizes related data in tables. Each table contains rows and columns, and each intersection of a row and column contains an individual value called a cell.

Tablerelated dataColumnsattributesCellsindividual valuesRowsrecordscontainscontainsintersects columns atintersects rows at
What contains what, and how does a table organize rows and columns to store individual values?

Tables as Data Containers

A table is a container for data about a single entity or concept. For example, a table might organize information about students. The table gives related information one overall structure instead of leaving each value disconnected from the others.

Worked example

A Student Information Table

Identify the role of each part in a table that stores student information.

  1. 1
    Name the table

    Students is the table because it is the container for information about one concept: students.

  2. 2
    Identify the columns

    student_id, name, and email are columns. Each column identifies one category of information, or attribute, that can be recorded for a student.

  3. 3
    Identify the rows

    Each horizontal entry is a row representing one student record.

  4. 4
    Identify the cells

    A value such as a student's email is stored in a cell, where one row and one column intersect.

Result

The table is the container, columns describe the categories, rows represent individual records, and cells hold the individual values.

student_idnameemail
101Aminaamina@example.test
102Luisluis@example.test

Generated illustration of a Students table. Each row is one record, and each column is one attribute.

Finding a Value by Intersection

A row and a column have different jobs. The row identifies one complete record, while the column identifies one property shared by records in that table. To locate one particular value, use both: select the relevant record's row and the relevant property's column. Their intersection is the cell containing the value.

Row: 101Aminastudent_ididentifieramina@example.testrow 101 × emailRow: 102Luisnameperson's nameemailemail addressintersects emailintersects row 101
How do the position and intersection of a row and column identify a specific piece of data?
Key point

A cell is not a fourth primary data structure alongside tables, rows, and columns. It is the location where a row and a column meet, and it holds one individual data value.

Formal Relational Vocabulary

Relational database terminology gives formal names to the same three structures. A table is called a relation, a row is called a tuple, and a column is called an attribute. Learning both sets of terms helps you connect beginner-friendly explanations with database documentation and later technical discussions.

TableRelationRowTupleColumnAttributeformal nameformal nameformal name
How do the formal terms relation, tuple, and attribute map to the everyday terms table, row, and column?
Everyday termFormal termWhat it represents
TableRelationA container for data about a single entity or concept
RowTupleOne record
ColumnAttributeOne property or category of information
CellIndividual data valueThe value at the intersection of a row and column

The formal vocabulary maps directly to the familiar table-row-column structure.

Spreadsheet and Database Table

A spreadsheet and a relational database table can both appear as grids, so the visual similarity can be misleading. A database may resemble a spreadsheet with multiple sheets, but databases are more powerful and structured. In a relational database, the table-row-column arrangement is the foundation for reliable querying, filtering, updating, and rule enforcement.

Spreadsheet gridfamiliar gridMultiple sheetsgrid-like organizationDatabase tablestructured dataQueries and rulesreliable data managementmay containsupports
What is structurally and purposefully different between a spreadsheet grid and a relational database table?
FeatureSpreadsheetRelational database table
Visible structureCan resemble a grid with multiple sheetsOrganizes related data into tables with consistent rows and columns
Main organizationGrid-like formatTable, row, column, and cell structure
Data management purposeThe source describes the familiar grid appearanceSupports reliable finding, filtering, and updating of information
Rules and reliabilityNot specified in the sourceCan enforce rules such as unique student_id values and valid email formats

The source emphasizes that databases may look familiar while providing more structured and powerful data management.

Mistakes Beginners Make

  • Common mistake

    Treating a row as a category of information

    What it looks like

    Calling name or email a row

    Why it fails

    A row represents one complete record. A category or property of information is represented by a column.

    Do this instead

    Describe name and email as columns, and describe one student's complete entry as a row.

  • Common mistake

    Treating a column as one record

    What it looks like

    Calling all student entries in the name column one student

    Why it fails

    A column represents one attribute shared across records. It does not represent one individual record.

    Do this instead

    Use the row to identify one student record and the column to identify a property such as name.

  • Common mistake

    Forgetting that a value belongs to both a row and a column

    What it looks like

    Describing an email value without identifying which record it belongs to

    Why it fails

    A cell is located at the intersection of a row and a column.

    Do this instead

    Identify the record's row and the attribute's column when locating a particular value.

  • Common mistake

    Assuming that a familiar grid is automatically a relational database table

    What it looks like

    Treating a spreadsheet-like appearance as the complete definition of a database

    Why it fails

    The source says databases may resemble spreadsheets but are more structured and powerful.

    Do this instead

    Focus on the consistent table-row-column organization and its support for reliable queries, updates, and rules.

  • Common mistake

    Using formal terms as if they describe different structures

    What it looks like

    Thinking a tuple is separate from a row

    Why it fails

    Tuple is the formal relational term for row, just as relation is the formal term for table.

    Do this instead

    Map relation to table, tuple to row, and attribute to column.

Check Your Understanding

EASY

A table called Courses contains the columns course_id, title, and email. One row contains 7, Databases, and learner@example.test. Identify the table, the row, the columns, and the cell containing learner@example.test. Then give the formal relational term for the table, the row, and each column.

Hints
  • The table is the container for information about one concept.
  • The row is the complete entry containing 7, Databases, and learner@example.test.
  • The value learner@example.test is found where one row and the email column intersect.
  • Use relation, tuple, and attribute for the formal terms.

What do you think happens?

If you need to locate the email value for one particular student, what two pieces of information must you use?

  • The table name and the spreadsheet appearance

  • The student's row and the email column

  • Two different tables

  • Only the column name

Reveal answer
Answer:

The student's row and the email column

A cell holds a value at the intersection of one row and one column. The row identifies the record, and the column identifies the attribute.

The Working Model

  1. 1
    Tables are containers for related data about a single entity or concept.
  2. 2
    Rows represent individual records, while columns represent attributes or properties.
  3. 3
    Cells are the individual values located where rows and columns intersect.
  4. 4
    The formal terms are relation for table, tuple for row, and attribute for column.
  5. 5
    Although a database can resemble a spreadsheet, its consistent structure supports reliable querying, updating, maintenance, and rule enforcement.

Once tables, rows, columns, and cells are clear, later database topics have a stable foundation. You can now read a table as organized data rather than merely as a grid: the table provides the container, the columns describe what can be recorded, the rows provide the records, and the cells hold the values.

Key Takeaways

  • A relational database is built around tables, rows, and columns.
  • A table stores related data, a row represents one record, and a column represents one attribute.
  • A cell is the individual value at the intersection of a row and a column.
  • Relation, tuple, and attribute are the formal terms for table, row, and column.
  • A database may look like a spreadsheet, but its structured organization supports reliable data operations and rules.

Related concepts

More concepts starting with I