• 0

Access help regarding relationships


Question

Hey guys I am having some trouble with my Access assignment and I am hoping someone can see what I am doing wrong. I am including the problem, it is long, and my data base file with screen shots to see if you guys can recognize what I am missing.

The full set of normalized tables for the WPC database is as follows:

rX82ia3.jpg

The primary key of DEPARTMENT is DepartmentName, the primary key of EMPLOYEE is EmployeeNumber, and the primary key of PROJECT is ProjectID. Note that the EMPLOYEE table is the same as the table we have created, except that Department is now a foreign key. In EMPLOYEE and PROJECT, Department is a foreign key that references DepartmentName in DEPARTMENT. Note that a foreign key does not need to have the same name as the primary key to which it refers. The primary key of ASSIGNMENT is the composite (ProjectID, EmployeeNumber). ProjectID is also a foreign key that references ProjectID in PROJECT, and EmployeeNumber is a foreign key that references EmployeeNumber in EMPLOYEE.

5pkoxMB.jpg

A. Figure 2-25 shows the column characteristics for the WPC DEPARTMENT table. Using the column characteristics, create the DEPARTMENT table in the WPC.accdb database.

B. For the DEPARTMENT table, create a data input form named WPC Department Data Form. Make any necessary adjustments to the form so that all data display properly. Use this form to enter into your DEPARTMENT table the data in the DEPARTMENT table shown in Figure 2-26.

C. Create the relationship and referential integrity constraint between DEPARTMENT and EMPLOYEE. Enable enforcing of referential integrity and enable cascading of data updates, but do not enable cascading of deletions.

D. Figure 2-27 shows the column characteristics for the WPC PROJECT table. Using the column characteristics, create the PROJECT table in the WPC.accdb database.

QwPjzxc.jpg

KO19bz6.jpg

E. Create the relationship and referential integrity constraint between DEPARTMENT and PROJECT. Enable enforcing of referential integrity and enable cascading of data updates, but do not enable cascading of deletions.

F. For the PROJECT table, create a data input form named WPC Project Data Form. Make any necessary adjustments to the form so that all data display properly. Use this form to enter into your PROJECT table the data in the PROJECT table shown in Figure 2-28.

G. When creating and populating the DEPARTMENT table, the data were entered into the table before the referential integrity constraint with EMPLOYEE was created, but when creating and populating the PROJECT table the referential integrity constraint was created before the data were entered. Why did the order of the steps differ? Which order is normally the correct order to use?

H. Figure 2-29 shows the column characteristics for the WPC ASSIGNMENT table. Using the column characteristics, create the ASSIGNMENT table in the WPC.accdb database.

I. Create the relationship and referential integrity constraint between ASSIGNMENT and PROJECT and between ASSIGNMENT and EMPLOYEE. When creating both relations, enable enforcing of referential

integrity, but do not enable cascading of data updates or cascading of data from deleted records.

J. For the ASSIGNMENT table, create a data input form named WPC Assignment Data Form. Make any necessary adjustments to the form so that all data display properly. Use this form to enter into your ASSIGNMENT table the data in the ASSIGNMENT table shown in Figure 2-30.

K. When creating the relationships between the database tables, we allowed the cascading of data changes between some tables but not between others. (Cascading means that changes to data in one table are also made to the other table in the relationship.) The value of a primary key changes in this case, and that change is then made in the values of the matching foreign key. Why did we enable cascading of related field values between (1) DEPARTMENT and EMPLOYEE and (2) DEPARTMENT and PROJECT but not for (3) EMPLOYEE and ASSIGNMENT and (4) PROJECT and ASSIGNMENT?

u0Lot0l.jpg

SmqljYS.jpg

Ckwv3Zb.jpg

L. For both the DEPARTMENT and EMPLOYEE tables, create a data input form named WPC Department Employee Data Form. This form should show all the employees in each department.

M. Create a report named Wedgewood Pacific Corporation Department Employee Report that presents the data contained in your DEPARTMENT and EMPLOYEE tables. The report should group employees by department. Print out a copy of this report.

 

OK so now that the question is up, I am getting stuck when I go to input the values from figure 2-30 (above) using the form, I get this error

IFIzmv2.jpg

Here are my relationships

Ueqbjad.jpg

And here are my tables

e4e7ixJ.jpg

Wea346m.jpg

AtwPE7H.jpg

HAalooN.jpg

I know this is a wall of text and pictures but I am hoping someone can spot what I am doing wrong, I have emailed my professor but shes pretty bad with getting back to anyone and its an online class so I wont see her. Thanks

 

 

 

database.zip

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

This topic is now closed to further replies.