
T3 Home>Foundations>Week 9 >Database Tutorial Home>Getting Started
|
Getting Started
|
This section introduces
basic Database skills. As you read, you will be invited to "Try Out"
the skill introduced. Each time you see the Interactive Mouse Icon Note: If you are on a Mac, use the Finder to switch back and forth between the window for this tutorial and the window for your application. The Finder is in the upper right hand corner of your screen, and, by holding the mouse button down on the Finder, you will see a list of all applications open on your Mac. If you are on a PC, "Alt+Tab" will automatically switch between your open windows. 1. Preparation
2. Designing a Database |
3. Entering Data: 4. Managing Data: 5. Integration: |
|
1. PREPARATION 1.1 Preparation: Understanding & preparing data. Understanding data
~ Preparing data ~
1.2 Preparation: Common database menu items. The menu items in database applications vary quite a bit, however the basic features are quite consistent. You will have to learn the language used in your database application. Notice the similarities in the menu items for FileMakerPro, AppleWorks, and Microsoft Access. The yellow and green ellipses note the items that have very similar functionality, just different names and varying depths of complexity.
1.3 Preparation: Choosing a pre-designed database. Most database applications offer pre-designed databases for your use. At minimum, they might offer an address book or a contact list. If you are simply transferring your rolodex onto a database, you may want to use a pre-designed database that came with your software. In FileMaker Pro,
you have to find the Templates folder within the applications software
folder after going to File>Open. In AppleWorks, go to File>New. After choosing the assistant, you choose a template. It may not be clear which of the templates listed are actually databases. The address book assistant is a database. It looks like this: Choose the Assistant
and the Address List database. You will be prompted
through a series of dialog boxes beginning with this one. In Microsoft Access, go to File>New and select the Database Wizard option. You will be guided through a series of dialog boxes that will help you choose a pre-designed database.
1.4 Preparation: Preparing to design your own database. Any time you take to prepare for designing your own database from scratch will be well worth the effort. As you will see, your application will immediately require you to input a lot of details about your information and how you would like to organize it. While it might even be a simple database, you need to have your information broken down into more than just the original categories discussed in 1.1 of this tutorial. All databases are based on the fundamental structure of records and fields. To create database that will tell me about each student and their particular status with regards to the field trip, I will be creating a record for each student. Within each record, all the information will have to be broken down into separate fields. For each field, you will have to decide on a label for the field and what type of information will be entered. Here's a table that illustrates breaking down the categories of data into fields, the label for the field, and the type of data that will actually be entered.
After going through this step of preparation, you will be ready to create a database from scratch on any database application.
2. DESIGNING A DATABASE 2.1 Designing a Database: Create a new database. To create a new database from scratch, have a detailed list ready of the fields you will want to define. Know what you will want to title the database, and be prepared to begin entering some of your data so that you can see how effectively you designed your database. You can always edit it as necessary, however it is best to get it as functional as possible right in the beginning. Go to File>New. In AppleWorks, the dialog box looks like this:
In FileMaker Pro, you will need to title your database right away before it will open. After going to File>New, this dialog box appears. Be sure to pick a logical destination to which you save your database.
In Microsoft Access, go to File>New.
Once you create a database in Microsoft Access, you still have to Create a Table. MS Access is a very powerful database application which allows you to essentially create many databases within one database file. Each of these are called Tables.
2.2 Designing a Database: Create fields. To create fields, you will need to know three things before proceeding:
Most helpful would be to make a list similar to that presented in 1.4 of this tutorial. Applications will often not let you proceed without designating at least one field. While you can always add or delete fields later, it is ideal to have as many fields set up initially as possible. In AppleWorks and FileMaker Pro, a dialog box for defining fields appears immediately after creating a new database file. Notice the similarities between the two. Enter each field name one at a time, choose a type, then click create. Do not click Done until you've created all of your fields.
After creating a database file, you will Create a Table and define Field Properties. The idea is the basically the same in that you must assign a field name and a data type. You may choose to use the Table Wizard to guide you through the process of creating fields, as well.
2.3 Designing a Database: View options. You can view your database in a few different ways. Your data can be viewed one record at a time or in a list view, which looks like a spreadsheet. Depending on the number of fields in your database, the width of your List view can get long and cumbersome. You'll find these to be the two most basic views. Notice the different places to find viewing options in the menus.
Note a few more linguistics differences. MS Access calls the List View, Datasheet View. It also calls Layout View, Design View. The most important thing is for you to become familiar with the views in your own application. Important Note: Your menu items will change depending on the view that you are in. In a particular view, you will be able to perform specific functions otherwise unavailable. Linguistics aside, here are the most common views described:
In Browse view, an individual record will appear. For example, see the following AppleWorks record:
In List view, records will all appear in a table, very much like a spreadsheet. For example, see the following FileMaker Pro database in List View. Also note where in FileMaker Pro to find the option for List View. It does not appear in the menu items above.
2.4 Designing a Database: Create a layout with graphics, lines, and text. Database applications allow you to customize the way all of your fields appear in a record. We just finished discussing views in 2.3. In order to design a layout for your fields, you first need to go into the Layout or Design view of your application. Once there, you'll see graphics tools appear which will allow you to manipulate each field name and field and the surrounding space as you wish. You can insert graphics, add lines, and text once your tools appear.
3. ENTERING DATA 3.1 Entering Data: Modifying, adding, & deleting fields. As you enter data, you might decide that you would like to modify a field. Perhaps you would like to adjust the data type of a field from text to date or number. Perhaps you realize that you created a field that is really not necessary and you would like to delete it. Perhaps you would like to add a new field altogether. Find the feature which will allow you to define your fields. A dialog box listing all of the fields you originally created will appear. Modify as necessary.
3.2 Entering Data: Adding new records. Data entry is the process of inputting your information into each field provided within each record. You can either create a new record, or add information to an existing record. To add a new record, you will need to make sure you are in the browsing, form, or list view. If you are in Design/Layout or Find view, the options to add a new record may be grayed out. You can create a new record by going to the appropriate menu item or by using your application's shortcuts. Most often, after entering data into a new record, it is automatically saved. Notice that the TAB key will easily transfer you from one field to the next.
Shortcuts might look something like this:
3.3 Entering Data: Finding an existing record. Finding an existing record in a database is a valuable database skill. You may simply want to view the data, or you may want to modify the data by entering updated information. At this point, we will discuss finding just one record. For instance, if you have a database of student records, you might like to look up one particular student for some reason. Your
application may have a shortcut like this FileMaker icon: You can also use the menu items if you cannot find a shortcut icon.
After going to Find in AppleWorks and FileMaker Pro, what appears to be a blank new record shows up. This is not to be confused with a new record, in fact. It is actually a tool to help you in your search. For instance, in AppleWorks Layout>Find, if you were looking for a Laura Hina in 7th grade, you would type her name and grade in this find view, then click Find on the left. Notice the find tools and shortcuts on the left that appear in the Find view.
All searching in Microsoft Access is done through queries. This is covered briefly in 4.2 of this tutorial, and more comprehensively in some of the tutorials on the Other Resources page in this website.
4. MANAGING DATA 4.1 Managing Data: Sorting records. You may want to browse your records in a particular order. For instance, if you have a database that tracks the amount of books your students have read, you may want to sort your student records by the number of books read. Sorting is always done in ascending(1-10) or descending(10-1) order. You may want to see your sorted records in ascending so you can note those who may need help with reading the most. To sort your records, first make sure you are in the view that allows you to browse your data. While sorting, you can be in either the list view or the form view. Find your sort feature. In FileMaker Pro,
the menu item and dialog box look like this: In AppleWorks, the
menu item and dialog box look like this: In Access,
you can sort your results after doing a query(see 4.2). The sorting dialog
box might look something like this:
4.2 Managing Data: Finding multiple records(queries). You may want to find a particular group of records. Another name for this searching process is a query. This means that you are going to ask the database application you are in to perform a search of all of your records based on certain values within fields. A query can be as simple as asking for all records that have particular contents in one field. A query can get very complex, as well. Examples follow. A Simple Query A Mildly Complex
Query The more complex the query the more likely it is you will have to use operators and create equations based on the value of a field. This process varies quite a bit. In FileMaker Pro, you can use operators within the blanked out record that appears when you go to the Find view:
In AppleWorks,
you use the Match Records feature. The menu item and dialog box look like
this: In Microsoft
Access, there are a variety of options for the queries that you can perform.
Initiate a New Query and work your way through one of the options. The
basic idea remains the same; use operators and/or functions involving
the relevant field values to express the types of records you are looking
for.
4.3 Managing Data: Creating reports from data. One of the rewards of having data entered into a well designed database is being able to quickly pull reports together that facilitate analysis of your information. All database applications will have a feature that will allow you to design the layout of a report, decide which records in the database will be included in the report, and save the report for future use. These three things occur in different order and through different terminology depending on the application you are using.
The idea is to have your data appear so that it reports just the specific information you need. For example, from the student records database called 7th Grade Homeroom, perhaps you want to create a Master Field Trip List. You want to be able to print out a clean copy to be able to share with various people such as the bus driver, the principal, the hostess at the aquarium, etc. To illustrate the concept of creating a list type report, follow along in these steps in AppleWorks. Note: Though the steps and terminology vary, all applications provide similar options. Step One: Make sure you are in the layout/design view. Step Two: Select
the feature that will allow you to create a new report. Step Three: Select
the type of report and designate a title. Step Four: Select
the fields and their order which you would like to include in the report. Step Five: Design your report. Modify, add, or delete headers and footers. Insert graphics. Change font attributes. Notice the before and after in this simple AppleWorks example. Before & After: Step Six: Browse
your report. At some point you will need to do a find or a query to only
show those students who turned in their permission forms. Use the skills
introduced in 4.2 of this tutorial for assistance. Reports can be valuable just to view on the monitor screen or in a printed version. If you do plan to print reports, be sure an look closely at your report before printing through print preview. Always look critically at your data to make sure your query was successful for your report. Errors in data entry will result in reports with misinformation.
5. INTEGRATION Mail merge is when you have a word processing document that you merge with a database. For example, you may have one letter to send home with students to all parents. You create a letter in a word processing program and you merge it with your student records database. With a few clicks of the mouse, your letters will print out personalized("Dear Mr. & Mrs....") and properly addressed. The way it works is that a word processing software application with have a Mail Merge feature. Upon choosing this feature, you will be able to choose the database you want to merge with and the fields within the database that you wish to plug in to your document. You create this mail merge master document inserting fields in particular places. For example, from the student records database, you would insert the appropriate field in the place of the parent names and their addresses within your generic letter to all parents. The most important step in the process, after saving, is to go to Print Preview or a similar feature that will allow you to preview the way your data was transferred to your word processing document. For example, notice the Mail Merge features of Microsoft Word and AppleWorks: AppleWorks Word
Processing document merging with an AppleWorks Database Microsoft
Word document merging with a FileMaker Pro Database
|
||
![]()
http://www.k12.hi.us/~tethree/01-02/
Last
Updated on 10/25/01.
Diana_Papini@notes.k12.hi.us.