Fields vs Records

Summary: Differences Between Fields and Records in a Database is that field is a combination of one or more related characters or bytes and is the smallest unit of data a user accesses. A field name uniquely identifies each field. When searching for data in a database, you often specify the field name. While A record is a group of related fields. For example, a student record includes a set of fields about one student. A primary key is a field that uniquely identifies each record in a file. The data in a primary key is unique to a specific record.

You are watching: What is the difference between a record and a field

*

Fields

A field is a combination of one or more related characters or bytes and is the smallest unit of data a user accesses. A field name uniquely identifies each field. When searching for data in a database, you often specify the field name. Field names for the data in the Instructor file are Instructor ID, First Name, Last Name, Extension, Office, and Web Address.

A database uses a variety of characteristics, such as field size and data type, to define each field. The field size defines the maximum number of characters a field can contain. For example, the Instructor ID field contains 6 characters and thus has a field size of 6.

Types of Data in a Field

*

The type of data in a field is an important consideration. The image to your right identifies the data types for fields in the Instructor and Student files. The data type specifies the kind of data a field can contain and how the field is used. Common data types include:

Text (also called alphanumeric) — letters, numbers, or special characters.Text (also called alphanumeric) — letters, numbers, or special charactersAutoNumber — unique number automatically assigned by the DBMS to each added record.Currency — dollar and cent amounts or numbers containing decimal values.Date (also called date/time) — month, day, year, and sometimes time.Memo — lengthy text entries.Yes/No — only the values Yes or No (or True or False).Hyperlink — E-mail address or Web address that links to a Web page on the Internet or document on a local network.Object — photo, audio, video, or a document created in other programs and stored as a bitmap in the database.Attachment — document or image that is attached to the field, which can be opened in the program that created the document or image (functioning similarly to e-mail attachments).

See more: Rule Number 1 To Be A Boss Ass Bitch, Nicki Minaj & Ptaf

Records

A record is a group of related fields. For example, a student record includes a set of fields about one student. A primary key is a field that uniquely identifies each record in a file. The data in a primary key is unique to a specific record. For example, the Student ID field uniquely identifies each student because no two students can have the same Student ID. In some tables, the primary key consists of multiple fields, called a composite key. For example, the primary key for the Schedule of Classes file could consist of the fields Semester Code, Class Code, and Class Section, which together would uniquely identify each class listed in a schedule.