extra credit - Temple Fox MIS

advertisement

MIS 2502

Lab 6 – Building a Functional Application in Access 2007

This assignment is extra credit for up to 5 points. You will receive points based on how well you build your database as described below and the creativity of the interface you build.

Objective : To become familiar with Access features including creating simple forms and a basic switchboard to create a small but functional database.

Deliverable :

Create a compressed version of the database and drop to the digital drop box (DO NOT

EMAIL).

INSTRUCTIONS:

Throughout our SQL exercises, we have worked on the Hairy Vet database (the ERD for the database is shown below). In this exercise, we will see how we could create the Hairy Vet database using Access.

To prepare for this assignment, you should review the chapters 8 - 11 in your book. You may work in pairs of two but you must add both names to the file name and the label so both students will receive credit.

1. Create the following tables in Access as described in the ERD. Make sure to add the proper field properties such as format, required flag, caption, and validation rules and text. You will note that these are the same tables you created for homework 1. Use that database as the basis of this lab.

When defining the use of foreign keys to establi sh relationships, you must use the “Lookup

W izard” when setting the data type of the filed which will store the foreign key. Please review the section of the text which discusses the “Lookup Wizard” on pages 31-32. DO NOT use the drag and drop capability in the relationship view. However, after you have established all of the required relationships using the “Lookup Wizard” you will need to use the relationship view to edit each relationship so that you enforce referential integrity, cascade update related fields, and cascade delete related fields.

CJ Marselis 4/17/2020 1

MIS 2502

Lab 6 – Building a Functional Application in Access 2007

CJ Marselis 4/17/2020 2

MIS 2502

Lab 6 – Building a Functional Application in Access 2007

Animal_color

Breed

Species

Vet

PK :Color ID

PK: Breed_ID

PK: Species_ID

PK: Vet_ID

Vet_State

Vet_Client

**** State is a lookup data type to vet_state.state_abbreviation

PK: State_Abbrev State_Abbrev

‘XX’

PK: Client_ID

FK: State to

Vet_State.state_abbre

v

Zip – Zip

Input Mask

>= 15000

<=88888

Zip code must be at least

15000 and less than or equal to

88888

State: PA

Zip:

19122

CJ Marselis 4/17/2020 3

MIS 2502

Lab 6 – Building a Functional Application in Access 2007

Appt_Type

Animal

Vet_Appt

**** Breed is a lookup data type to breed.breed_id

****Client_id is a lookup data type to vet_client.client_id

**** Species is a lookup data type to species.species_id

**** Primary_Color is a lookup data type to animal_color.color_id

PK: Appt_Type

PK: Animal_ID

FK: client_ID to vet_client.client_id

FK: primary_color to animal_color.color_id

FK: breed to breed.breed_id

FK: species to species.species_id

DOB: Short

Date

DOB: >=

01/01/19

70 <= today

GENDER must be

FS, FN,

MS, or

MN

**** Vet_id is a lookup data type to vet.vet_id

**** Animal_id is a lookup data type to animal.animal_id

PK: Appt_ID

FK: vet_id to vet.vet_id

FK: animal_id to animal.animal_id

FK: appt_type to to appt_type.appt_type

Appt_Date:

General Date

Appt_Dat e: >= now <=

Now +

365

Appointm ent date must be between current date and

Appt_Date

: Now

Temperatu re: 101.5

CJ Marselis 4/17/2020 4

MIS 2502

Lab 6 – Building a Functional Application in Access 2007

**** Appt_typw is a lookup data type to appt_type.appt_type time to 1 year in the future

Temperat ure >=90

<=110

Temperat ure must be between

90 and

110 degrees

F.

Note: Oracle has some data types that do not match to Access and vice versa – Please see chapters 7 and 18 in your book which describe data types. For instance, in Access, there is one text data type. You can specify the size of this text field and all values entered into the field must be less than or equal to that size. For instance, you can have a first name field that is text 30. This means you can store any name which is up to 30 characters in length. You might wonder why you wouldn’t always keep the default size of Access (50 characters). Typically, we want to keep a field that is the proper size as the values that will be stored as it helps with data quality.

In Oracle, there is no text field but there are a Char and a VarChar data types. You will learn more about these in your labs. For now, just use a text field of the same size as the Char or VarChar indicated in the table descriptions indicated below. For instance, if you see VarChar2 (10Byte), use a text data type with a field size of 10 in Access. Oracle has a wide range of number data types which Access does not have.

CJ Marselis 4/17/2020 5

MIS 2502

Lab 6 – Building a Functional Application in Access 2007

2. Using the data sheet view, enter 4 records into the following tables. You can make up the content. a. Vet_State b. Animal_color c. Appt_Type d. Breed e. Species f. Vet g. Vet_Client

3. Create an Animal data entry form using the form wizard. a. Using the Animal data entry form, add 4 new records

4. Using the directions in the tutorial for creating a M:N form, create the Vet_Appt data entry form. a. The form should allow the user to:

Select an animal

Select the vet

Enter the date and time of the appointment (this is in the composite/bridge entity)

Select the appointment type from a drop down list (this is in the composite/bridge entity) b. Add 4 records to the Vet_Appt table using your form

5. Create a Switch Board with the following buttons that performs the functionality described below: a. Add an Animal: Opens up the animal form for the user to add an animal b. Add an Appointment: Opens the Appointment Form for user to add an appointment c. Exit Application: Closes the user out of Access

6. Add images to each form and make the switch board look professional. Note : POINTS

ARE ADDED FOR CREATIVITY!!

CJ Marselis 4/17/2020 6

Download