Project 7

advertisement
Due: 4/11/2016
Project 7 Description
40 Points
Building your own database
Warning: You must create tables using the fields listed below for your Project 7 database. Any
other tables and fields will not be graded. Do not use data from the in-class lab session, my
sample document, or my lab discussion document.
In this project you will create a simple contact manager database using Microsoft Access that
will record basic information about a person and the contact information for contacting a person
in up to three different ways. First create a new database with the name consisting of your
initials, an underscore, and "Contacts". For example, my new database would have the name
jrn_Contacts.accdb. You will have to create two tables to record this information.
The first table, Person, needs to record the following items about a person. Be sure to set the
properties specified below for each field.
PersonID
First name
Last name
Date last seen
City
Married
Type of contact
use the autonumber data type so the system will automatically assign a
unique number for the PersonID; this is the primary key.
Required field
Required field
use a validation rule to ensure that the date last seen is > 1/1/2007; make
sure to include a validation. This is a required field.
Required field. Default value: Gurnee
yes or no
business, friend, relative - accept only these three values; use a validation
rule and text. Required field. Default value: business
Pick reasonable field names and data types for the fields. Make sure the text fields are
reasonable lengths – long enough to hold the range of values for that field, but not so long that
there is no value having such a field length. If the field has a fixed range of values, then make
sure the field length is long enough to hold the maximum number of characters, but no more. In
other words, I don’t want to see any text fields with field size of 255, the default. If the field has
a list of possible values, then the field length should be the length of the longest possible correct
value. Include data validation rules and messages for date last seen and type of contact
The second table, Contact, will include the following 3 fields used for contacting a person:
PersonID
a number field with the field size of long integer is used to tie this contact
information to a person in the previous table, the Person table. Do not use
autonumber for this field since it is referring to an existing person in the
Person table.
Contact method
Work, Home, Email - accept only these three values. Required field.
Default value: Work
Contact information either work or home phone number or Email address - example of data for
this field: 312-908-4456 or jnorth@clcillinois.com. Make sure to set the
field size so it can at least handle your student email address. This is a
required field.
JRNorth
1
Spring 2016
Due: 4/11/2016
Project 7 Description
40 Points
The primary key for this second table will be the concatenation or the composite of the PersonID
and the Contact Method fields. Concatenation or composition means that you will need to select
both fields before pressing the primary key tool icon. This is also called a composite key - made
up of several fields. Several records will have the same PersonID but different Contact Method
types. You do not need an autonumber field for the Contacts table since the PersonID field in the
Contact types table refers to the number given to the PersonID field in the Person table. Include a
data validation rule and a validation message for contact method. The data validation rule and
validation text message are not needed for the Contact Information field.
You need to build a relationship between the Person table and the Contact table. Make sure to
use referential integrity to ensure that there is a person in the database before adding a Contact.
Also select Cascade Deletes in the referential integrity dialog. Do not use Cascade Update since
it does not make sense with an autonumber field since autonumber fields cannot be changed by
the user.
You must populate the Person table with 6 names and the Contact table with at least 10 records
associated with records in the Person table. Your name must be in one of the rows of the Person
table. Make sure that you do ‘best fit’ for all the fields in the Person table and in the Contact
table.
Project 7 Rubric
Item
Description
Points
1 Correct filename
1
2 7 fields with good names and data types in the Person table
7
3 Correct properties assigned to the fields above
6
4 Validation rule and text for Date Last Seen
2
5 Validation rule and text for Type of Contact
2
6 Text field sizes are reasonable
1
7 Type of Contact field size is correct
1
8 Primary key assigned to PersonID field
1
9 Your name as a record in the Person table
1
10 3 fields with good names in the Contact table
3
11 Correct data types & properties with correct size for Contact Method
3
12 Validation rule and text for the Contact Method field
2
13 PersonID and Contact Method fields assigned as Primary Key
2
14 Data relationship built
2
15 Referential integrity turned on
1
16 Cascade Delete turned on
1
17 At least 6 rows in Person table
1
18 At least 10 rows in Contact table
1
19 Best fit for all fields applied to Person table datasheet
1
20 Best fit for all fields applied to Contact table datasheet
1
JRNorth
2
Spring 2016
Due: 4/11/2016
Project 7 Description
40 Points
Project 7 Rubric
Item
Description
Database Techniques
Creating table in datasheet view
Creating table in design view
Setting validation rules
Building relationships between tables
JRNorth
Points
Total:
40
AC 10 - 16
AC 17 - 20
http://office.microsoft.com/en-us/accesshelp/validation-rules-HA010285532.aspx
https://www.youtube.com/watch?v=MhfNQci_VzU
3
Spring 2016
Download