Page 35 - IP
P. 35
Library
Bid Name Author Price Mem_name Issue_Date Status
B01 Wings of A.P.J 550 Sarita 2018-05- Returned
Fire Abdul 20
Kalam
B02 The Monk Robin 340 Simmi 2018-03- Not
who sold Sharma 15 Returned
his Ferrari
B03 You can Shiv Khera 230 Rajat 2018-04- Returned
win 16
B04 Who Spencer 450 Ram 2018-03- Not
moved my Jhonson 17 Returned
cheese
B05 Real Patrick 250 Sia 2018-06- Not
Success Mather- 18 Returned
Pike
i. Suggest the suitable data type for Issue_Date column.
ii. Suggest the suitable SQL command to change the size of column name from 30
character to 50 characters.
iii. Mention the significance of Bid column in table Library.
iv. Suggest the suitable command to display a list of the books in a sequence so that first
all the book’s name should be displayed which has not been returned and after that all
the book’s name which has been returned should be displayed.
(d) Rishi, a class XII student has given following commands for the given purposes: 2
i. To add a new column “Rating” :
update table library add column rating varchar(20);
ii. To give an increase of 50 Rs. to all the books:
alter library set price=price+50;
Check if above given SQL commands will be able to achieve desired task or not. Justify
your answer. Suggest the correction (s) if required.
6. (a) Write SQL query to create a table “BOOKS” with the following structure: 2
Table: BOOKS
Field name Datatype Size Constraint
BOOK_ID Integer 2 Primary Key
BOOK_NAME Varchar 20
CATEGORY Varchar 10
ISSUE_DATE Date
OR
(a) Help Ramesh in identifying any two columns for a table named student along with their
suitable data type
6