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

Refer to the following ERD, which maps courses to prerequisites. Answer question

ID: 3749999 • Letter: R

Question

Refer to the following ERD, which maps courses to prerequisites. Answer questions COURSE CRS ID VARCHAR(8) PK DEPT-CODE VARCHAR(12) FK CRS_DESCRIPTION VARCHAR(64) CRS_CREDIT FLOAT PREREQ CRS_ ID VARCHAR(8) PK FK1 PREREQ-ID VARCHAR(8) PKFK2 tt (TI I F) PREREQ s a weak entity. (T II F)The relationship COURSE:PREREQ is weak. (TII F)All prerequisite courses (crscode) in PREREQ, must link with a valid course in COURSE. (T II F)The foreign key in PREREQ is a composite key (CRS ID, PREREQ ID). (T II F)Upon implementation, table indexes are automatically generated for both tables. What does it mean to say that a database displays both entity integrity and referential integrity? How are each established?

Explanation / Answer

a. False, because PREREQ is a recursive relation which is not necessarily a weak entity.

b. False, because there there is no weak entity the relationship cannot be weak.

c. True, because it is a foriegn key from the take COURSE.

d. False, because there are 2 different foriegn keys.

e. True, primary key index will be generated for both.

Entity integrity means that primary key must not be null. It is established in the language itself, because in any DBMS when you input the primary key column the language doesn't allow you to pull null in it.

Referential integrity means that keys in the main table must exist for each key in the referenced table. This is also maintained by the language by not allowing to delete the main key first and not allowing to put entries in the referenced tables which dont exist in the main table.