I am asking ques. 29 see in photo
PLEASE help me.
Answers
CREATE TABLE “BOOK”
( BOOK ID Char (4),
Bname Varchar (15),
Author Varchar (30),
Price Decimal );
book ID should be made the primary key as every book has an ID that is unique to it.
Book name can also be made a primary key but book ID is a better option.
So book name can be an alternate key.
B. In the char data type, the data stored should be of the exact length as specified by the user. In Varchar , the data need not have as many characters as specified. But, the number of characters of data entered cannot exceed the number specified.
DDL data description language- It comprises of commands that help in defining and modifying structure of data.
Whereas DML, data manipulation language contains commands that allow the user to manipulate date in a database.
FOR CREATING THE TABLE WE CAN WRITE:-
create table BOOK ( BOOK_ID(4), Bname char(15), Author char(20), Price decimal);
a) PRIMARY KEY:- BOOK_ID, because BOOK_ID is a unique id given to each book.
b)
(i) CHAR AND VAR-CHAR:- char is of fixed length whereas var-char is of variable length .
(ii) DDL AND DML :- DDL stands for DATA DEFINITION LANGUAGE where as DML stands for DATA MANIPULATION LANGUAGE.
DDL contains the commands related to the formation of a table.
whereas, DML contains the commands related to the modification of table.
please vote me the best if you are satisfied.
for more whatsapp me on +91-6299504768