Can a relation have more than one foreign key? Explain with the help of an example.

Database Management System >   Keys in DDMS >   Foreign key  

Long Question

3756


Answer:

Yes, a relation can have more than one foreign keys and each foreign key can refer to a different relation. For example, consider REVIEW relation that includes the details of ratings given by the reviewer to a particular book. Here, books and reviewers (or authors) must be associated with book and author that are already in the BOOK and AUTHOR relations respectively. In this case, two foreign keys R_ID and ISBN will be defined on the REVIEW relation that will be related to the primary keys of the AUTHOR and BOOK relation respectively (see Figure below).


This Particular section is dedicated to Question & Answer only. If you want learn more about Database Management System. Then you can visit below links to get more depth on this subject.




Join Our telegram group to ask Questions

Click below button to join our groups.