Database Fields

48 modules covering EVERY Computer Science topic needed for KS3 level.

GCSE Computer Science

45 modules covering EVERY Computer Science topic needed for GCSE level.

A-Level Computer Science

66 modules covering EVERY Computer Science topic needed for A-Level.

KS3 Databases Resources (14-16 years)

A-Level Introduction to Databases (16-18 years)

Table of Contents hide

Database

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.

Field

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 mean less time for backups, as well as for searching data within the database.

A simple example is a table that saves an employee’s job records. 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 it 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, the hire date is a required field, while religion can be an optional field. Tenure is a calculated field derived from the 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:

Further Readings:

About this site

Teach Computer Science provides detailed and comprehensive teaching resources for the new 9-1 GCSE specification, KS3 & A-Level. Equally suitable for International teachers and students.

Over 5,000 teachers have signed up to use our materials in their classroom.

What do we provide?

In short: everything you need to teach GCSE, KS3 & A-Level Computer Science:

Exam boards

Our materials cover both UK and international exam board specifications:

© 2024 Teach Computer Science
This site uses cookies to improve your experience. To find out more, see our cookie policy.