Database Column

In the context of relational databases, a column is a set of data values, all of a single type, in a table. Columns define the data in a table, while rows populate data into the table.
Most databases allow columns to contain complex data like images, whole documents or even video clips. Therefore, a column allowing data values of a single type does not necessarily mean it only has simple text values. Some databases go even further and allow the data to be stored as a file on the operating system, while the column data only contains a pointer or link to the actual file. This is done for the purposes of keeping the overall database size manageable – a smaller database size means less time taken for backups and less time to search for data within the database.

A simple example is a table that stores customer information for a bank. The columns in this table may take the form of: Customer Name, Customer Phone Number, Customer Date of Birth, Customer ID, Address, City, Postal Code. A row of data is each horizontal set that contains data for for a customer fr all the columns listed. For example:
CustomerNamePhoneDoBIDAddressCity
1Andrew Jones202-555-245212-Jun-70435612 Maple DriveNew York
The term “field” is usually used interchangeably with “column,” but database purists prefer to use the word “field” to denote a particular value or single item of a column. Thus, a field is the intersection of a row and a column. In the bank example above, a field is formed by the intersection of a row with the column “Customer Name” to form “Andrew Jones.” However, this distinction is ignored by most.

Post a Comment

0 Comments