ACCT 2381 – Accounting Databases Lesson 2 Exercises

Instructions Exercises are based on cases from the Adamski text. Some have been modified by the instructor.

Programming Pros 1. Download the database named Programming from Lesson 2 and save it to your working disk.

2. Open the Programming database. Open the Tutor table in Design View. a. Set the field properties for the fields in the Tutor table as shown in Figure 2-50 on page 108 of your text. b. Add a new field between School and HireDate named Groups. This field will be a Yes/No field and the caption should be set to Groups Only. c. Save your changes to the Tutor table.

3. Maintain data in the Tutor Table. a. View the Tutor Table in Datasheet View. b. Delete the record for Barbara Alzo. c. Indicate that the following tutors conduct group tutoring sessions only: Sally Gilbert, Ian Rodreguiz, and Larry Smith. d. Fredrik’s last name is misspelled. Change the spelling from “Karlson” to “Carlson”.

4. Create a new table name Student in Design View. a. Add the following fields to the Student table. Use your own judgment to assign appropriate field sizes and types (see Lesson 2 PowerPoint for guidelines). Student ID, LastName, FirstName, Address, City, State, Zip, Birth Date, Gender. b. Move the LastName field so that it follows the FirstName field. c. Ensure that an appropriate primary key for the Student table has been established. d. The default city is Raleigh and the default state is North Carolina (NC). e. Gender will be entered as “M” for male or “F” for female. Establish a validation rule and text for this field. f. Save the design changes to the Student table.

5. Switch to Datasheet View for the Student table. a. Using the Phone Quick Start selection in the Data Type gallery, add the four phone fields phones between the Zip and Birth Date fields. (Hint: Be sure to make the Birth Date field the active field before adding the new fields). c. Delete the Business Phone and Fax Number fields. d. Ensure that the phone fields have appropriate field sizes. e. Enter your A number in the Student ID field and your name in the first and last name fields. f. Change the state from the default state to TN. You may omit all other fields.

F13 6. Create a new table named Contract in Design View. a. Add the following fields to the Contract table. Use your own judgment to assign appropriate field sizes and types. Contract ID, Student ID, Tutor ID, Contract Date, Session Type, Length (number field), NumSessions, Cost, Assessment (Yes/No, caption: Pre-assessment exam complete) b. Establish an appropriate primary key for the Contract table. c. Define a validation rule that ensures that Length may only be entered as “2” or “3” hours (use numbers only in the rule).

7. Define a one-to-many relationship between the tables in the database. Enforce Referential Integrity and select cascade updates. Save the changes in the Relationships window.

8. Close the Programming database.

GoGohper! 1. Download the database named Gopher from Lesson 2 and save it to your working disk.

2. Open the Gopher database. Open the Plan table and change the following field properties in Design View a. PlanID – field size = 3 b. PlanDescription – field size = 40 c. Plan Cost – Format = Standard, 0 decimal places d. FeeWaived – Type = Yes/No e. Save the changes to the Plan Table. Click “Yes” if a message appears indicating that some data might be lost.

3. Create a new table named Member. In Design View, add the following fields: a. MemberID, Short Text, field size = 4 b. PlanID, Short Text, field size = 3 c. FirstName, Short Text, field size = 20 d. LastName, Short Text, field size = 25 e. Street, Short Text, field size = 40 f. City, Short Text, field size = 25 g. State, Short Text, field size = 2, default state is Colorado (CO) h. Zip, Short Text, field size = 10 i. Phone, Short Text, field size = 14 j. DateJoined, Date/Time, Short Date, caption = Date Joined k. Expiration, Date/Time, Short Date, caption = Expiration Date

4. Add an additional field at the end of the Member table called MemberhipStatus. a. Membership status may only be “Active”, “Inactive”, or “On Hold”. Define a validation rule for this field. b. The default value for the Membership Status field is “Active”.

5. Add your name to the Member table. Enter 999 as your Member ID and change your state to TN.

6. Try entering “Not Active” for your membership status. Note what happens. Change your status to “Inactive” and save your record (you may omit entries in all other fields).

F13 7. Create a one-to-many relationship between the Plan and Member tables. Apply appropriate settings. Save the changes in the Relationships window.

8. Close the Gopher database.

Rosemary Animal Shelter 1. Download the database named Shelter from Lesson 2 and save it to your working disk. Open the Shelter database.

2. Edit the Patron table in Design View a. Use your own judgment to adjust field types and/or sizes based on database best practices. b. Ensure an appropriate primary key has been defined for the Patron table.

3. Maintain data in the PatronTable. a. View the Patron Table in Datasheet View. b. Add your first and last name to this table. Your Patron ID is NSC 1000. c. Save your design changes. Click the Yes button if a message displays indicating some data may be lost.

4. Create a new table in Design View named Animal. a. Add the following fields to the Animal table. Use your own judgment to assign appropriate field sizes and types. AnimalID, PatronID, AnimalName, Age, Gender, AnimalType, Description, ArrivalDate, Adopted (will be answered as “Yes” or “No”), AdoptionDate b. Specify an appropriate primary key for the Animal table. c. Modify the Animal table so that the default animal type is Dog.

5. Create another table in Design View named Donation. a. Add the following fields to the Donation table. Use your own judgment to assign appropriate field sizes and types. DonationID, PatronID, DonationDate, Description, DonationValue b. Ensure an appropriate primary key for the Donation table.

6. Donations with a value greater than $500 must be entered in a special database. Modify the Donation table so that no donation greater than $500 is allowed in this table. (Note: Omit formatting when using numbers in validation rules.)

7. Create appropriate relationships between the tables in this database. Apply appropriate settings. Save the changes to the Relationships window.

8. Close the Recycling database.

Upload the following completed files to the Exercises folder through NS Online Assignments: Gopher.accdb  Shelter.accdb Programming.accdb

F13