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

You\'re exploring a database and you find some sample data in two tables: Textbo

ID: 3853016 • Letter: Y

Question

You're exploring a database and you find some sample data in two tables:

Textbook

The Textbook table uses a natural key, the combination of title and author.

The same combination of columns is in the Course table where it’s a foreign key.

(a) Since (title, author) is the primary key of Textbook and a foreign key in Course, is the repeated paring of title and author in the Course table a redundancy?

(b) If the Textbook table had a surrogate key instead of a natural one, do you think it would improve the Course table, or would it make no difference?

courseNum credits textbookTitle author COP4710 4 Database Systems Jones COP4711 4 Database Systems Jones COP4720 4 Data Algorithms Jones MAT1001 3 College Algebra Watson MAT1002 4 College Algebra Watson ENG4267 4 Materials Smith ENG4280 3 Materials Smith

Explanation / Answer

a) No (title,author) does not make the table redudant. As they are foreign key not primary key.
primary key cant be repeated bt foreign key can be repeated. let us understand by one example:
in course table we have same author and booktile but both differ in either course name or credits
so this not increases the redudancy

b) Yes it would make difference. As surrogate key cant be repeated in any table.so by having this
as surrage key it decreases the complexicity in course key. no of record will be less. same field
will occupiy double data
  

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