SQL Foundations  «Prev  Next»

Lesson 2 The elements of databases
ObjectiveUnderstand the Relationship between Database Elements

Relationship between Database Elements

Database Analogy

For a new person that is starting in information technology, you can think of databases as spreadsheets, as described in the following link.
Database Spreadsheets
The items that you will be working with include the following:

Databases, Tables, Rows, Columns

  1. Databases: You will recall from the prior lessons on normalization that several different tables can make up a given information set. Typically, for a given application, those tables will reside in a single database, used as a logical container for all the related information. Here is additional information about creating databases.
  2. Tables: Tables contain the sets of (normalized) information that represent your data. Tables are not individual data elements, but rather collections of very specific items. For example, you might have a table that contains product information and a table that contains sales information.
  3. Rows: Rows refer to the set of information bits that make up a single, complete information item.
    Think of rows literally as what they sound like. As in a worksheet or spreadsheet, rows are horizontal stripes of information in the database table. In more standard terms, a row represents a record in the database.
  4. Columns: The final, most specific bit of information in the database table is the column. If you think of the database as a spreadsheet, it is easy to understand that the column is the vertical piece of information in the table.

The largest cup represents the database
1) The largest cup represents the database

The next smallest cup represents a table.
2) The next smallest cup represents a table.

Even smaller than that is the cup that represents a row.
3) Even smaller than that is the cup that represents a row.

Finally, the smallest cup represents a column.
4) Finally, the smallest cup represents a column.


Select Statemet
Typically, when you are using SQL statements, you will be selecting columns (specific information items) from rows (complete sets of information) in a given table (a set of related information).

Database Parts - Quiz

Take this brief quiz on the different parts of databases.
Database Parts - Quiz