A relational database is made up of different components. The most important of these is the table. All the data in the database is stored in the database table. Without tables, there would not be much need for relational databases at all.
Information on a single subject is placed in order as rows and columns in a relational database. For example, a database for a company would typically contain a table for employee information, which would store employee numbers, addresses, phone numbers, and so on, as a series of columns. Every single piece of data is a field in the table. A column consists of all the entries in a single field, like the telephone numbers of all the employees. Fields, in turn, are arranged as records, which are complete sets of information, each of which contains a row. The method of normalisation aims at identifying how data will be most effectively systematised into tables.
A table is a named relational database data set that is arranged by rows and columns. The relational table is a vital relational database concept, because tables are the principal form of data storage.
Columns form the table’s structure, and rows form the content. Tables permit restrictions for columns, but not for rows. Every database table must have a distinct name.
Relational tables keep data in columns and rows. When forming a table, columns must be described, but columns may be appended or removed after table creation. During this time, column data restrictions may or may not be defined. For example, when creating an EMPLOYEE_MASTER table for storing employee information, definitions may be added. An example of this could be a DATE_OF_BIRTH column accepting dates only or an EMPLOYEE_NAME column that may not be null.
Table rows are the table’s actual data elements. In the EMPLOYEE_MASTER table, the rows hold each employee record. Thus, a row consists of a data element contained within each table column. If a row value is not entered, the value is termed “null,” which does not have the same meaning as a zero or a space.
Tables have other table connections that are determined by special columns. The most influential of these are primary and foreign keys. Going back to our original example, the EMPLOYEE_MASTER table has an EMPLOYEE_ID column that is used to uniquely identify each table employee. If another table needs to refer to a certain employee, a corresponding column that references the EMPLOYEE_MASTER table’s employee ID may be inserted. Other tables do not need to store additional employee details that are already stored in the EMPLOYEE_MASTER table.
Database Table Structure
A database has one or more tables, wherein each table has rows and columns. Each row in a relational database is distinctly identified by a primary key. A primary key can be present in one or more sets of column values, but most of the time it is found in a single column.
Each relational table has a primary key. A primary key is used to distinctly identify each row in the database. The same primary key value cannot be present in two rows. The practical benefit of this is that you can distinguish each row without needing more information than its primary key.
Columns – These are defined to hold a specific type of data, such as dates, or numeric / textual data. It is defined by its name and data type. The name is used in SQL statements when selecting and ordering data, while the data type is used to validate the stored information.
Rows – A table can contain zero or more rows. When there are zero rows, it is said to be empty. There is no practical limit on the number of rows a table can hold.
The columns are can be thought of as giving the table its personality, while the rows can be considered to grant it its substance.