Database Management Lecture: Access

What are databases?

Structure of Relational Databases

Picture: Example of a single table in a database

Examples

Designing a Database

Some thought should go into design before creating it:

Using Access

Creating Tables

Design View

Picture: Creating a table in Design View

Datasheet View

Picture: Entering records in Datasheet View

Queries (Searching a Database)

Select Queries

Picture: Defining a select query. Here, the Like operator is used to return all addresses on Elm street

Parameter Queries

Other types of Queries

Forms

A form is a formatted database object, able to depict information from multiple tables in a database. A form can also have options and buttons which perform actions that the user can specify. Forms are commonly used for:

Using the Form Wizard

Since creating a form can be tedious, the Form Wizard is recommended to get the basics of a form started, and then the user can fine tune it.
  1. Start Form Wizard from main Database Window
  2. Select which tables and fields you wish your form to contain (see picture below)

    Picture: Forms can make data entry easier by incorporating fields from different tables. Here, we are creating a form to enter orders. We have already selected First name and Last name fields from one table. And we are about to add the date field from a different table to our form.

  3. Continue through walkthrough, picking the order of your fields, layout (columns, justified, etc.) and a form name
  4. When finished, Access will create a form for you (see sample below)

Picture: Data can be entered into the form in Form View. Updates to the different tables takes place automatically. The form helps the user to enter data by filling in fields for you if it can. For example, since the field labelled purchase is the primary key in the Product table, selecting "widget" automatically fills in the Unit Price field for $3.00

Customizing your form

Picture: This picture shows the same form as the previous picture, but in Design View, where editing can occur. Notice that we've added a new field: Total Price, which automatically computes the total cost based on the multiplication of two other fields. The user can type in this expression directly (field names must go within square brackets), or s/he can use the Builder to build the expression.

Reports

Like forms, reports can nicely layout information from a variety of different database objects, such as tables and queries. Reports, however, are created mainly for display or printing purposes.

Using the Report Wizard

  1. Start Report Wizard from main Database Window
  2. Follow walkthrough similar to Form Wizard. Reports can contain field information from multiple tables
  3. Specify grouping and sorting criteria
  4. Add summary information (averages, etc.) if desired
  5. Access will create the report for you (see picture below)

Picture: A sample report shown in Layout Preview mode. The Report Wizard lets you group and summarize data in several different ways. Here, orders are grouped by employee.

Customizing your report

Picture: Editing a report in Design View


Back to Table of Contents