Database Concepts

Published by Pearson
ISBN 10: 0133544621
ISBN 13: 978-0-13354-462-6

Chapter 2 - The Relational Model - Review Questions - Page 107: 2.12

Answer

Give an example of a relation with a unique composite key. A composite key is when you can uniquely identify a row in the table with a combination of two columns in the table. For example, imagine the following table: TEACHER (LastName, FirstName, Department) Where the composite key is (LastName, Department) Another example is: APARTMENT (BuildingNumber, ApartmentNumber, NumberOfBedrooms, Rent) Where (BuildingNumber, ApartmentNumber) is a unique composite key.

Work Step by Step

It is possible that in a school, there will be several teachers who have the same last name. It would be unusual, however, for there to be teachers with the same name in the same department. That is why, In this table, we could use LastName and Department as a composite key. In an apartment complex, there could be several apartments called 1A. However, each building would only have one apartment called 1A. Therefore we could combine these into a composite key.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.