DATABASE
Explanation of Terms
FIELD - CATEGORY - a title to enter information under
RECORD - 1 card with information entered (1 person's data, 1 recipe's data etc.)
FILE - a set of cards (RECORDS)
SINGLE RECORD LAYOUT - All information for one record (person, recipe, etc.)
Follwing is an illustration of a single record layout
MULTIPLE RECORD LAYOUT - information for many records (people, recipes, etc.)
return to table of contents
DATABASE APPLICATIONS
SORTING
- Open the Lit DB that is on your disk.
- Go to the Data menu and select Sort.
- Click on Field and drag to TITLE. Let up on the mouse button.
- Click on Sort.
- The database is now sorted alphabetically by title.
- Try sorting by PUBLISHER.
- What problems might you anticipate in sorting the TITLE column?
- What does this tell you about entering data in a database?
return to table of contents
CHANGING COLUMNS
- Move the arrow between two field names at the top of the database.
- A crossbar appears.
- Click the mouse button and drag to widen or shrink the size of the column.
- Move the arrow to the top of the field name GRADE LEVEL
- A hand will appear.
- Click and drag the GRADE LEVEL column so that it is on top of the ILLUSTRATOR column.
- Let up on the mouse.
- You have now changed the field positions in the layout.
- Try moving the PUBLISHER field to place it just after the AUTHOR field.
return to table of contents
SEARCHING THE LIT DATABASE with FILTERS
A student would like a list of books by the author Tomi dePaola.
The selection criteria is:
AUTHORLASTNAME equals dePaola
To find all the books by Tomi dePaola you must create a New Filter.
- From the Data menu, select New Filter .
- Click and hold the mouse button down on None to view the choices.
- Drag to AUTHORLASTNAME and release the button on the mouse.
- Under the Comparison heading leave equal.
- Click in the Compare to box to get a cursor and type the comparison information:
- dePaola.
- Press return. Only the books written by Tomi dePaola will be
selected.
Before you try another filter you must choose Data from the menu bar and drag to Select All. This will select all of the data in the database to show on the screen.
Connectors tie two selection rules together. Rules can be combined by using the connectors OR and AND. OR means that records will be selected if either of the rules is true. AND means that records will be selected only if both of the rules are true.
P>
Example: A student wants to select a story written by Tomi dePaola
that is a fable. He does not want to include all the books by Tomi
dePaola but only those that are fables.
The selection sentence would read:
AUTHORLASTNAME equals dePaola and OTHER contains fable.
- From the Data menu, select New Filter.
- Click and hold the mouse button down on None to view the choices.
- Drag to AUTHORLASTNAME and release the button on the mouse.
- Under the Comparison heading leave equal.
- Click in the Compare to box to get a cursor and type the comparison information:
- dePaola
- Return to the None, click and drag to OTHER.
- Under Comparison, drag to contains.
- Click in the Compare to box to get a cursor and type the comparison information:
- fable
Only books written by Tomi dePaola which are fables will be selected.
return to table of contents
return to table of contents
PRACTICE EXERCISES
Search the Lit database by creating filters to answer the following questions. Write the selection criteria or selection sentence and the answer in the response boxes provided.
return to table of contents
CREATING A DATABASE
- Open MSWorks 3.0.
- Go to File and select New.
- Click once on Database and then click New.
- Type FIRSTNAME in the New Field box and click the OK button.
- Type LASTNAME in the New Field box and click the OK button.
- Type STREET in the New Field box and click the OK button.
- Type CITY in the New Field box and click the OK button.
- Type STATE in the New Field box and click the OK button.
- Type ZIP in the New Field box and click the OK button.
- Add any other fields, such as parent phone numbers and names and birthdays, that you wish to include. When you have finished, click the Done button.
- Go to Form on the menu bar and drag to List View.
- Enter the information about one student. Type the data and press tab
to move to the next cell on the right.
Continue entering data for the class.
If you make a mistake, simply click the cursor in the cell and re-type the information.
Your window should look like this:
return to table of contents
SORTING A DATABASE
- Go to Data and drag to Sort.
- Click and hold on the box under Sort on field and drag to lastname.
- Click on Sort and watch what happens.
Repeat the process, sorting on the field, firstname.
Try sorting by street, birthday, etc.
return to table of contents
MATCH RECORDS
- Go to Data and drag to Match records.
- Type a birthday month in the box and click on Match.
This option allows you to search the database for a common parameter.
return to table of contents
CREATING A REPORT FOR PRINTING
The database cannot be printed out as it is - it would run off the margin of the paper! In order to print, you must first make a Report and then print out that report. In fact, you will make several reports.
- Go to Report and drag to New Report.
- Type the title address and click Create.
- Use the crossbar cursor to widen and narrow the columns until name, street, city, sate, and zip fit on the screen.
- Go to File and select Print Preview. This will allow you to see what the document will look like when printed out. If the information doesn't fit the way you would like it to, go back to the report and change it.
- Again, go to Report and select New Report.
- Type a title: other information and click Create.
- Use the hand cursor to drag the street column off the screen to the right.
- Drag the city, state, and zip off the screen in the same manner.
- Use the crossbar cursor to widen or narrow the remaining categories.
- Do a print preview, and print if you like what you see.
You can change the size of the type by going to Form and selecting Format Character. In the same menu, under Form, you can also choose to print the data with or without the Grid.
You can also print a simple class list by going to Report, selecting New Report, and using the crossbar cursor to move all the columns except for the names off the screen, then printing the report.
return to table of contents