Table

A table is a structured file type containing data within a set number of columns and any number of rows. Tables are organized around data of a specific type. For example, a table of invoices would have fields for every data element associated with one invoice.

One row in a table can be thought of as an individual record; each contains one primary key that is a unique value for that row (for example, Invoice Number) and may contain secondary keys that are primary keys in other tables. This structure of tables containing keys associating rows on other tables is the “relational” part of a relational database.

Tables are used by relational databases, but also can be used as data structures internally in programs. Tables are roughly analogous to spreadsheets, however they differ from spreadsheets in some crucial ways. They follow rules set in by the database; for example, to prevent adding a record with a duplicate primary key. And unlike spreadsheets, they are optimized for transactional processing (updates, additions and deletions) with additional functionality like commits, rollbacks and timestamps.