Jan's Illustrated Computer Literacy 101 Logo:Jegsworks Jan's Illustrated Computer Literacy 101


Home > Jan's CompLit 101 > Working with Databases > Intro > Flat File Database
Icon: Arrow - Previous pagePrevious    NextIcon: Arrow - Next page

Jan's Working with Databases

   Intro: Flat File Database

A database program that uses only one table for the fields is a flat file database, also called just a flat database. In the previous lesson, you saw how a spreadsheet can work as this type of database, IF the fields for one record are put in a single row. A spreadsheet is not the best tool for databases with a large number of records or when you want to do queries and reports.

A database program is designed to make it easy to:

  • Enter and view data
  • Keep data consistent
  • Use queries to group, sort, and filter data
  • Create reports

Most databases that have been around a while have evolved into relational databases but there are still some old-fashioned flat file databases out there. Some are hiding inside programs like photo album programs, calendar programs, and contact managers.

Microsoft Works includes a simple database feature that works as a flat file database. We won't hang around long in Works. It is a very simple database and is rather awkward to use.

 Star Wars Collectibles as a Microsoft Works database

starwars.wdb in datasheet view in Microsoft Works 9.0


Microsoft Works:  A Simple Flat File Database

The illustration above is of datasheet view, called a list in MS Works. The records are in rows and columns. It looks very much like a spreadsheet. Microsoft Works is very limited in what it allows you to do with a database.

In many ways Excel actually is more user-friendly in its database features than Microsoft Works, but not in everything.

Form in Microsoft WorksForm View: Unlike in Excel, even in a basic database like Microsoft Works, you can rearrange and format the form view to suit yourself. Color is nice, but even nicer is being able to see all the fields in a compact form and with enough room to write.
 

Report in Microsoft WorksReport View: Reports in Microsoft Works can give you a basic print-out. Some of the fields in the Star Wars Collectibles database need more room than the default formatting gives.

Report design view in Microsoft WorksHappily, the Report Design View lets you make some adjustments to the formatting of the report like widening the space, adding text wrapping, and changing the font.

Clearly the report is based on a datasheet layout.

You can move fields to a second row for the report and group the records.

The example at the right groups the records by YearMade and puts a dividing line between the groups. It also formats the fields to wrap the text.


Report in Microsoft Works, customizedBe forewarned - The text in a field will be cut off if you did not leave enough space in the report design view.


 


Do It!

If you have Microsoft Works installed on your computer, you can download and open the sample database and play. Just click the image below and save the file. Then open it with Microsoft Works.

Links to a Microsoft Works database Icon: Left click with mouse Click the image to download an example:
Star Wars Collection as a Microsoft Works database,
starwars.wdb

Icon: Experiment Experiment! Play around with it.
Try the following activities in the database:

  • Scroll to view all of the fields.
  • Switch views: from form view to list view (called datasheet view in other programs).
    [Use the View menu or the View buttons Buttons: Views in Microsoft Works]
  • Sort using various columns: menu Record | Sort... and select up to three columns
    [Excel was friendlier for sorting!]
  • Return to Original order: Sort Ascending on first column only, ItemID.
  • Microsoft Works: Hidden rowsCreate a filter to show only items made in 1999: menu Tools | Filter...  Name the filter YearMade 1999.
    [Row numbers show that some rows are hidden. This was much easier in Excel.]
  • Add a filter to the previous filter to show items that were a Gift.
    [There are now 5 items.]
  • Remove all the filters: menu Record | Show | Show All.
  • Add new record with form: From the menu select View | Form....  Go to the last record by clicking the navigation button Button: Navigate to last record. Make up some data and enter it in a new record.
  • Change to Form Design view: Click the Form Design button Button: Design (Microsoft Works) on the toolbar.
  • Make changes to the form: Change the layout or formatting of the form using the toolbar and menu dialogs and by dragging the fields around on the form.
  • Display a saved report: View | Report. With the only saved report, StarWarsCltn, selected, click Preview. View all pages. Zoom In and Zoom Out. There are 4 pages. Some fields are on a separate page. Close the preview by clicking the Cancel button. The window shows the Report Design view. Unexpected!
  • Make changes to the report in design view: Change the layout or formatting of the report, using the toolbar and menu dialogs.
  • Icon: Print ? (Your instructor may want you to print your changes) Print the modified report: File | Print...
  • Close the window without saving your changes.