| Creating
an Access Database: A Primer for Resource Center Managers by
|
Examining an Existing Access 97 DatabaseTable of ContentIntroductionOpening a Sample Access Database Opening a Previously Opened Database Looking at the Structure of a Database Looking at the structure of a table Looking at tables and relationships Entering data Looking at the data Forms Querying the database Printing the contents of a table Reports For More Information IntroductionI've found it helps to open up someone else's database and take a look at how it's constructed before you begin planning your own database. People who know how to design databases are infinitely creative. Because of their creativity and design, you can get and adapt their methods for your own databases.Access comes with a sample database for you to use right away or adapt for your own purposes. This is the NorthWind database. We will not be examining this database. You can also download several databases from the Microsoft Website. Databases that I've downloaded onto my desktop at home include, Music Collection Manager and Wine List Manager. I don't use either one, but I like to look at how the programmers have organized information in the database. Other, more useful databases for downloading include the Book Collection database, the Event Management database, the NorthWind database, and Students and Classes database. If you are taking this module as a workshop you will be provided with the Students and Classes database. Look in Sample databases (C:\Msoffice\Access\Samples) for the database called Students and Classes1.mdb. If you are taking the workshop on the web, why don't you go to the Microsoft Website and download the Students and Classes database. Click on the database and download it into your downloads subdirectory into a sudirectory of its own. I like to keep the downloaded files separate from the executed files so that I can keep straight which is which. The downloads subdirectory also acts as a backup copy in the event that I trash a database in my playing with it. After you've downloaded it, you might want to spend some time looking at it. In fact, that's just what we're going to do now. Opening a Sample Access DatabaseFrom the File menu, select Open Database. Change to the MSOffice subdirectory and then to Access. There you will see two additional sudirectories, Ready-to-Run and Samples (see image).
Go into Samples and open Students and Classes1.mdb. Opening a Previously Opened DatabaseAn Access database has the extension .mdb You open it just as you would any other Windows file by selecting File | Open and then giving the name of the database or finding where you've stored it on your hard drive.Looking at the structure of the databaseWhen you open a database Access will display all of the database objects in the Database window.Database objects include tables, queries, forms, reports macros, and
modules. In general, in Access, the term object is used to refer
to something you can select and manipulate as a unit.
This is the structure of the Students and Classes database. Looking at the structure of a tableTo look at the structure of a specific table, click on the name of table you want to examine and then click Design. You will see the database design window for that table, which provides information on each attribute, including its name, format, length, description and any special rules like restrictions on entry.Click on the table name: Students, then on Open, or double click the table name to open the table. ![]()
Looking at tables and relationshipsTo look at a diagram of how the tables in a database are related, you can view the Relationships window. Choose Edit | Relationships or click the Relationships button. The diagram shows you the tables in the database and the connections between them. The “1” indicates the one side of a relationship, and the “infinity“ symbol indicates the “many” side of a relationship.If there's a way to print an entity relationship diagram using Access, I have not been able to find it. Microsoft has a fix (add on to your program) you can download from their Website which will enable you to print the entity relationship diagram.
Full sized version of this diagram.
Entering DataLet's add some data to the Student table. Enter the following 2 records using the Datasheet view.
Looking at the dataTo see the contents of a table, either click on the table’s name and then click Open, or double click on the table’s name. Scroll though the data by using the scroll bars or by using the Page Up and Page Down keys and the arrow keys.
FormsWe will describe in detail later how to create your own forms, but looking at those in the sample database is instructive.
Querying the databaseWe will discuss queries in great detail later. However, several queries have been programmed for the sample database, and looking at them will give you an idea of how queries are used.
Printing the contents of a tableYou can print contents of a table if the table is open or if you select it in the Database window. Choose File | Print or click the Print button on the toolbar. Note: Do not print anything. Abort the print by replying 'no' to the request to continue.
ReportsReports allow you to get information out of the database in a format you've created.Reports can also be printed.
For More InformationSpend some time looking at the Students and Classes database and the other databases available from Microsoft. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|