Records, Fields, Delimiters, and Fixed Width
Below is an example of how data may look when in an application:
|
First Name |
Last Name |
Address |
City |
State |
#1 |
Joe |
Smith |
123 Main St. |
Atlanta |
GA |
#2 |
Bob |
Blue |
244 2nd St. |
New York |
TX |
#3 |
Mary |
Jones |
456 Adams St. |
Dallas |
OR |
Records
The data shown above has 3 records and 5 fields. Records are any row of data that contain information related to a specific item (in this case, each person). The following image highlights record #2 of the above dataset:
|
First Name |
Last Name |
Address |
City |
State |
#1 |
Joe |
Smith |
123 Main St. |
Atlanta |
GA |
#2 |
Bob |
Blue |
244 2nd St. |
New York |
TX |
#3 |
Mary |
Jones |
456 Adams St. |
Dallas |
OR |
Fields
Fields are the columns with the same type of information about various items. For example, the following image highlights the last name, which is a field of this dataset:
|
First Name |
Last Name |
Address |
City |
State |
#1 |
Joe |
Smith |
123 Main St. |
Atlanta |
GA |
#2 |
Bob |
Blue |
244 2nd St. |
New York |
TX |
#3 |
Mary |
Jones |
456 Adams St. |
Dallas |
OR |
Text files can be formatted in one of two ways: delimited or fixed width. Definitions and examples of each are below:
Delimiters
Delimiter marks are characters that separate the fields when data is stored in a file. They are commonly tab characters, semi-colons, or commas. In the following data, commas are used as delimiters:
,First Name, Last Name, Address, City, State
#1, Joe, Smith, 123 Main St. Atlanta, GA
#2, Bob, Blue, 244 2nd St., New York, TX
#3, Mary, Jones, 456 Adams St. Dallas, OR
Fixed Width
When using a mono spaced font (such as Courier New), a fixed width text file will appear to be in columns. The data below is fixed width:
First Name Last Name Address City State
#1 Joe Smith 123 Main St. Atlanta GA
#2 Bob Blue 244 2nd St. New York TX
#3 Mary Jones 456 Adams St. Dallas OR