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:
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.
starwars.wdb in datasheet view in Microsoft Works 9.0
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 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 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.
Happily, 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.
Be forewarned - The
text in a field will be cut off if you did not leave enough space in
the report design view.
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.
Click the image to download an example:
Star Wars Collection as a Microsoft Works database,
starwars.wdb
Experiment! Play around with it.
Try the following activities in the database: