About Database Tables
In a relational database, tables contain the data. When you query the database, you query the tables.
Database tables will most likely be the area you'll become most familiar with after working with databases for a while. Now, before we go ahead and start adding tables to our new database, let's have a look at what a database table actually is.
What is a Table?
In relational database terms, a table is responsible for storing data in the database. Database tables consist of rows and columns.
-
Rows
Rows run horizontally. They represent each record. A row is the smallest unit of data that can be inserted into a database.
Rows span multiple columns, and therefore, the definition of a column applies to the cell where the row intersects with that column.
In this example, the fourth row is selected/highlighted.
-
Columns
Columns run vertically. They contain the definition of each field.
You give each column a name, so that it is describes the data that is stored. Examples of column names could include FirstName, LastName, ProductId, Price, etc
In this example, the second column (called AlbumName) is selected/highlighted.
Many Tables
Most relational databases contain many tables.
For example, a database might have a Customers table, a Products table, an Orders table, and many more. In fact, it's not uncommon for a corporate database to contain hundreds of tables.