A brief introduction to databases and tables

Index Next

In a database system, the data that describe a specific entity (such as a member of a society, a stock item, etc.) are stored in a record.

A record consists of one or more fields. Each field represents an attribute of the entity represented by the record.

Records are stored in a table or file. A table is usually visualised as a rectangular display of data values as rows (records) and columns (fields).

A table storing information of a class of students

A table storing information of a class of students

In a table, there is a key field which can uniquely identify a record. In the above table, the key field can be Class_num or Stud_id.

A database is a collection of related tables. Usually, two related tables share a common field. For example, the two tables shown above and below are related by the common field Stud_id. As we will see later, the common field allows the user the view all necessary information related to a particular person stored in different tables. If this is to be achieved without using databases, we have to put all the necessary information in the same file. This wastes a lot of storage space to store redundant information.

A table storing the loan information of the students

A table storing the loan information of the students

Index Next