This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: One student, (I think is was Jeff?) in my 9:30 Tuesday & Thursday section asked about how integrity constraints are work in MS Access. During class, because I had changed the database somewhat, the example that I provided did not work. Therefore, I’ve gone back to a clean version of solomon1.mdb and stepped through the process of showing how one type of integrity constraint works in MS Access. In this example, I try to insert the number 6 into the Concrete Type foreign key in the Order table below. However, since 6 is not a primary key in the Concrete table, MS Access “barks” and indicates that I cannot insert a value into the Concrete Type field in the Order table unless that value is a primary key in the Concrete Type table. This is a picture of the interrelationships among the tables in the solomon1.mdb MS Access database. Note that Order has four foreign keys: Customer Number, Concrete Type, Truck Number, and Driver ID, which is linked to Employee ID in the Employee table. In the picture above, I tried to insert “6” into the Concrete Type field of the Order table. The error that came back when I tried to “enter” the record into the Order table was “You cannot add or change a record...
View Full Document
- Fall '09
- Foreign key, Order table