Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

The following data are in the tables Employee (primary key: Empno) and Departmen

ID: 3679217 • Letter: T

Question

The following data are in the tables Employee (primary key: Empno) and Department (primary key: Deptno). The questions refer to row numbers of this table. The first row of each table is row #1. Empdeptno in table Employee is a foreign key that refers to Deptno in the table Department. Deptmgr in the table Department is a foreign key that refers to Empno in the table Employee.

Which of the following statements is true?  
A. Row #7 of table Employee violates neither the entity integrity rule nor the referential integrity rule.
B. Row #7 of table Employee violates the entity integrity rule.
C. Row #7 of table Employee violates the referential integrity rule.
D. Row #7 of table Employee violates both the entity integrity rule and the referential integrity rule.

The values shown in the table Department:
A. violate neither the entity integrity rule nor the referential integrity rule
B. violate the entity integrity rule
C. violate the referential integrity rule
D. violates both the entity integrity rule and the referential integrity rule

Please give a short reason why the answer you picked is right. Thank you.

Table Employee Empno Empname Empdeptno Empsalary Emptitle 555 Kerny 200 7000 manager 666 Williams 100 8000 manager 777 Haberle 200 5000 clerk 888 Haberle 200 5000 clerk Johnson 300 4000 analyst 889 Dupont 400 McCabe 400 6000 programmer 999 Lopez 9000 manager Table Department Deptno Depname Deptcity Deptmgr 100 Logistics Wichita 666 200 Finance Boise 555 300 Marketing Pierre 666

Explanation / Answer

A) ROW#7 VIOLATES THE ENTITY INTEGRITY RULE BECAUSE, IN EMPLOEE TABLE EMPNO OF 7TH ROW IS EMPTY, ACCORDING TO DBMS NO PRIMARY KEY VALUE CAN BE NULL SO IT VIOLATES ENTITY INTEGRITY CONSTRAINT.

B) YES, ROW#7 VIOLATES ENTITY INTEGRITY RULE BECAUSE, NO PRIMARY KEY VALUE CAN BE NULL. IN EMPLOYEE TABLE EMPNO OF 7TH ROW IS NULL SO IT VIOLATES THE ENTITY INTEGRITY CONSTRAINT.

C) D) YES, ROW#7 VIOLATES THE BOTH ENTITY INTEGRITY AND THE REFERENTIAL INTEGRIY BECAUSE,

FOR ENTITY INTEGRITY RULE ANSER IS A) AND B)

FOR REFERENTIAL INTEGRITY RULE, EMPNO IS PRIMARY KEY AND REFERCE TO THE DEPTMGR IN DEPARTMENT TABLE. IF THERE ARE NULLS IN EMPNO COLUMN THEN DEPTMGR VALUES ALSO NULL IT CAN'T MAINTAIN THE CONSISTENCY AMONG THE TUPLES IN TWO RELATIONS.......

THE VALUE SHOWN IN THE TABLE DEPARTMENT:

A) B) C) D)

IN DEPARTMENT TABLE DEPTNO IS PRIMARY KEY AND REFERENCES EMPDEPTNO

IN DEPTNO THERE IS NO NULL VALUES SO NO ISSUE

DEPTNO REFERENCES EMPDEPTNO , IN EMPDEPTNO THERE ARE SOME NULL VAUES IN THAT COLUMN IT VIOLATES THE REFERENTIAL INTEGRITY RULE, BECAUSE THERE IS NO CONSISTENCY AMONG TWO TUPLES IN 2 REALTIONS...........

HOPE YOU CAN UNDERSTAND !!

THANK YOU...

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote