Database Fields

46 Computer Science Topics

We’ve created 46 modules covering every Computer Science topic needed for GCSE level. These are transferable across AQA, CIE, Edexcel, CIE & Internationally. Suitable for teachers or home educators alike.

Whether you’re a brand new Computer Science teacher, or you’ve been teaching ICT for years, our resources will save you hours and hours of lesson preparation every single week.

View the resources →


A database is a set of data arranged in a way that a computer program can immediately choose required portions of data.  It is often called a DB.

A common database can be compared to a filing system which is arranged by fields, records, and files.  A field is a specific piece of data, a record is a total set of fields, and a file is a group of records.  For example, a phone book can be considered a file with a list of records.  Each record has the following fields: name, address, and phone number.

A database management system (DBMS) is used to obtain data from a database.  A DBMS is a selection of programs that allows the user to input, arrange, and choose data from a database.  There are distinct kinds of DBMS, from small systems that work on personal computers, to large systems that work on mainframes.


A database field is a set of data values, of the same data type, in a table.  It is also referred to as a column or an attribute.

Most databases also allow fields to hold complex data like pictures, entire files, and even movie clips.  A field that allows the same data type does not mean it only has simple text values.  Some databases allow the data to be stored as a file on the Operating System, while the field data only contains a pointer or link to the actual file.  This is done to keep the database size manageable, given that smaller database sizes means less time for backups, as well as for searching data within the database.

A simple example is a table that saves employee’s job record.  The fields in this table could be the following: Employee ID, Last Name, First Name, Position, Department, and Hire Date.

Employee ID Last Name First Name Position Department Hire Date
00108 Doe John Assistant Manager Human Resources November 16, 2000
00109 Parker Anne Supervisor Financial Services May 1, 2003

Required, Optional and Calculated Fields

In database management systems, a field can either be required or mandatory, optional or calculated.  A required field is a field in which you must enter data.  It is mandatory to enter data; if you don’t, you’ll get an error message.  An optional field is a field where you may either enter data or leave blank; leaving it blank does not result in an error message.  A calculated field is a field where the value is a result of some formula concerning other fields.  There’s no need to enter data into a calculated field; the system automatically computes the necessary variables and outputs the correct value.

In an employee job record, hire date is a required field, while religion can be an optional field.  Tenure is a calculated field derived from hire date and current date.

Fields and Records

Fields are arranged into records, which hold all the information within the table related to a specific entity.  The records make up the table rows, while the fields make up the table columns.

Fixed Length and Variable Length Fields

Fixed length fields hold a fixed number of bits.  A drawback of utilising fixed length fields is that some parts may be unused, but it is still necessary to include spaces in order to comply with the maximum length case.  Moreover, in cases where fields are deleted, padding for the missing fields is still required in order to preserve fixed start positions within a given record.

Each database has its own database field types.  Here are some common database field types, which are called different names in accordance with the specific database design:

  • Text, Alphanumeric, Character, String
  • Byte
  • Short, Integer
  • Long, Integer
  • Single, Real
  • Double, Float
  • Counter
  • DateTime, TimeStamp
  • Date
  • Time
  • LongText, LongChar, Memo, Note
  • Binary
  • Boolean