Skip to Main Content

Oracle Database Discussions

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Can a foreign key reference a unique non-primary key?

737441Feb 10 2010 — edited Feb 10 2010
Hello everyone, I have 2 tables: [books] with the fields (id, title,author,isbn) and another table called [book issue] with the fields (id, borrower_id, borrow_date, book_isbn)..
Now the field (book_isbn) in the [book issue] table references (isbn) in the [books] table, which is a unique field but not a primary key.

My questions:

1- Is it correct for a foreign key to reference a unique but non-primary key in another table?

2- Is it okay for the foreign key field to have a different name than the field it references in the other table?

Your help is indeed appreciated..
This post has been answered by Zeeshan BaiG on Feb 10 2010
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 10 2010
Added on Feb 10 2010
2 comments
5,655 views