Computer Science, asked by Sren, 11 months ago

Create a table book Book ID Char. Bname Varchar. Author Varchar. Price Decimal Identify the primary key of the book table also mention the suitable reason for choosing it a Primary Key

Answers

Answered by BrentGavin
12
the answer is option A.

yashmodi26: who told
Answered by omegads03
20

CREATE TABLE Book (

Book_ID CHAR(20),

Bname VARCHAR(50),

Author VARCHAR(50),

Price DECIMAL(P,D),

PRIMARY KEY (Book_ID)

);

In this Book table Book_ID is chosen as the primary key. Primary key is the key that is unique for each record in a relational table. Here in this table the Book_ID is the unique key that uniquely identifies each record in the table.  Bname, Author and Price cannot be primary key as they are not unique. There may be same book name, same author name or same price.  

Similar questions