Saved Bookmarks
| 1. |
1) Create table BOOK with fields namely: Book_No, Book_Tiltle,Price,Qty, and Author.Create another table BOOK_ISSUE with the fields namely: Book_No, Student_name, Issue_Date,Return_Datea) Now, decide the primary key and foreign key in the above tables. |
Answer»
The Primary keys would be Book_No for both the TABLES. SINCE a Primary key MUST be a unique value and helps eliminate data redundancy, and book numbers cannot be the same, they can be categorized as Primary keys. The Foreign keys would also be Book_No for both the tables. A Foreign key acts as a point of reference to another table. Since the book number in the FIRST table is for STORAGE purposes and the book number in the second table is to help understand which book has been issued from the Book table, Book_No is the Foreign key for both the tables. |
|