Project 1: Intro
Text Databases

Title: Jan's Illustrated Computer Literacy 101
Did you want: Working with Databases: Access 2007, 2010, 2013, 2016

Even though many advanced database programs are available, you will need to know a bit about a plain text database. They are still used a lot behind the scenes.

What is plain text used for?

  • Transfer data: Moving data between different programs.
  • Program information: How the program was installed and how you have configured the program.
  • Log file: A list of actions, like errors or who accessed files or what updates have been applied.

Where you are:
JegsWorks > Lessons > Databases

Before you start...

Project 1: Intro Arrow: subtopic open
    Text databases
    Spreadsheet databases
    Flat file databases
    Relational databases
    ExercisesTo subtopics

Project 2: Access Basics

Project 3: Tables & Queries

Project 4: Forms & Reports


Example: Installation/Configuration File

Text database (configuration info)A simple list works well for information about how a program was installed. The example in the illustration is from Adobe Reader 7.0.

This example does not have rows and columns. The whole file is a database with only one record. Each field is on a separate line in the format:


Example: Log File

A log file is a text database that keeps a list of activities, like computer errors, program updates, or web site activity. 

The example below is part of a log of the requests on a certain day to the web server that hosts these lessons. Each web page or image that the browser needs is a separate request. It looks more like what we expect from a database than the previous example, apparently having rows and columns, separated by spaces.

Left click View full document

Left click [Image] document in Notepad

Left click [Image] scrolled document in Notepad

Each record is on one line. The fields appear to be neatly lined up in columns... until you scroll to the right. In some fields the values all have the same number of characters, but in other fields some values have many more characters than others. No more columns.

The first line above the records shows the names of the fields, but the names do not line up over the correct column.

TipRow of field names: Some text databases do not include the names of the fields as the first row, or any row at all! If you use a text database to move data between programs, you will need to know whether or not the first record holds the field names.

Icon: TroubleCan't see all of the fields in a single record at once:
When word wrapping is off and there are a lot of fields, you have to scroll horizontally to see all of them. So awkward!

Text database with text wrap turned on.Solution:
Turn word wrapping on.
In Notepad: choose  Format  |  Word Wrap .

But...when word wrapping is turned on, the fields no longer line up in columns. You can now see a complete record in the window at once, but it is much harder to read.

So, you get to choose one or the other:

  • See all of one record at once


  • Have the fields line up (maybe).


Notepad: Windows Update logText databases need a way to separate the records from each other and to separate the fields in a record. A character that separates data items or records is called a delimiter.

Example: The illustration at the right is of a log of updates to Windows.

What marks the start of a new record?

What separates the fields?

In General:

Records: Most text databases use an invisible new line character to separate records.

Fields: Several different characters are used to separate fields. You can not mix and match in the same document! Just one kind of field delimiter per document.

  comma ,
  pipe |
  semi-colon ;

Warning What if the delimiter character is used in a data value?
Your database can get scrambled! There are usually ways to have your chosen delimiter anyway, by using escape characters or quotes, but the database designer must think ahead carefully!

TipTransferring data: When you export data to a text database, you must choose a format and you may have a choice of what to use as a delimiter. When you open that text file in a different program, you will have to tell the program what the delimiter is. Some programs do not recognize all of the delimiters listed above, but commas and tabs are almost certainly acceptable.

Notepad: Windows Update log in CSV format, Comma Separated ValuesA format that is often used when transferring data between programs is CSV format (Comma Separated Values). This format puts a comma between each field, like the example at the right. The file may use csv as the file extension, like mydata.csv

CSV format is easy for computers to use, but it not easy for human eyes!