Computer Science Homework Solutions
Problem
#171129

Inspect its relationships for any referential integrity violations.

Please answer the attached questions.

Referential Integrity Check

Question 1 - Given the following data types of some table fields and the simple schema of the relational database they are a part of, inspect its relationships for any referential integrity violations. If any exist, list what they are:

Note: You can assume that cascading updates and deletes are not enabled.


Field data types for each table, with (PK) indicating the primary key field:

Employee Table
Field Name Type
EmployeeID (PK) Long Int
First_Name Text
Last_Name Text
Phone Text

Vehicle Table
Field Name Type
Vehicle_ID (PK) Long Int
Driver_ID Long Int
Model Text

Device Table
Field Name Type
Device_ID (PK) Int
EmployeeID Int
Type Text

Part Table
Field Name Type
Part_ID (PK) Int
Device_ID Long Int
Type Text

Conceptual schema showing inter-table relationships:

The actual schema in MS Access would look as follows:


Question 2 - Given the following data for the Employee and Vehicle tables, identify any referential integrity violations, if any:

EmployeeID First_Name Last_Name Phone
11 Chris Smith 8134567690
12 Pat Malone 9145551234


Vehicle_ID Driver_ID Model
1234 11 Ford F 150
4567 12 Toyota Rav4
2233 11 Pontiac
4993 NULL Chevy
6457 13 VW Jetta

Question 3 – As a user, can you delete the first record in the Employee table above, without violating any referential integrity rules? Explain why?
Note: That’s the record of Chris Smith with EmployeeID = 11.

Attached file(s):
Attachments
Referential_Integrity_Check.doc  View File

Attachment Content Summary (Note: view attachment at the above link before purchasing. Actual attachment content may vary slightly from that shown below.)

Referential_Integrity_Check.doc
Referential Integrity Check

Question 1 - Given the following data types of some table fields and the
simple schema of the relational database they are a part of, inspect its
relationships for any referential integrity violations. If any exist,
list what they are:

Note: You can assume that cascading updates and deletes are not enabled.

Field data types for each table, with (PK) indicating the primary key
field:

Employee Table

Field Name Type

EmployeeID (PK) Long Int

First_Name Text

Last_Name Text

Phone Text



Vehicle Table

Field Name Type

Vehicle_ID (PK) Long Int

Driver_ID Long Int

Model Text



Device Table

Field Name Type

Device_ID (PK) Int

EmployeeID Int

Type Text



Part Table

Field Name Type

Part_ID (PK) Int

Device_ID Long Int

Type Text



Conceptual schema showing inter-table relationships:

The actual schema in MS Access would look as follows:

Question 2 - Given the following data for the Employee and Vehicle
tables, identify any referential integrity violations, if any:

EmployeeID First_Name Last_Name Phone

11 Chris Smith 8134567690

12 Pat Malone 9145551234



Vehicle_ID Driver_ID Model

1234 11 Ford F 150

4567 12 Toyota Rav4

2233 11 Pontiac

4993 NULL Chevy

6457 13 VW Jetta



Question 3 – As a user, can you delete the first record in the
Employee table above, without violating any referential integrity rules?
Explain why?

Note: That’s the record of Chris Smith with EmployeeID = 11.

Employee

EmployeeID

First_Name

Last_Name

Phone

Device

Device_ID

EmployeeID

Type

Vehicle

Vehicle_ID

Driver_ID

Model

Part

Part_ID

Device_ID

Type
Solution
What is this?
By OTA - Overall OTA Rating
Baseraj Mathew, MCA - 3.7/5
Purchase Cost Now
$2.19 CAD (was ~$11.97)
Included in Download
  • Plain text response
$2.19 Instant Download
Add to Cart
Why you can trust BrainMass.com
  • Your Information is Secure
  • Best Online Academic Help Service
  • Students find real academic Success
Related Solutions
  • Referential integrity - Hi, I need assistance to the enclosed problem please. Regards, 1. Do the tables exhibit referential integrity? Answer Yes or No, and then explain your answer. Write NA (Not Applicable) if the t ...
  • Explain Rules for Referential Integrity Constraints - Describe the default rules for enforcing referential integrity constraints. Explain how referential integrity actions can be used to override the default referential integrity constraints.
  • Enforcing referential integrity constraints - Describe the default rules for enforcing referential integrity constraints. Explain how referential integrity actions can be used to override the default referential integrity constraints. Please ...
  • What are entity integrity and referential integrity? - What are entity integrity and referential integrity? Why are they important for relational databases? Please provide examples to support your answers.
  • Databases - Identification of candidate key - Hi, I need assistance to the enclosed problem. Regards, Do the tables exhibit referential integrity? Answer Yes or No, and then explain your answer. Write NA (Not Applicable) if the table does ...
Browse