doc3_4 mark sql
doc3_4 mark sql
maintain their inventory using SQL to store the data. As VisitorName and ContactNumber respectively in the
a database administer, Abhay has decided that : given table VISITOR.
• Name of the database - mystore VisitorID = “V004”, VisitorName= “VISHESH” and
• Name of the table - STORE ContactNumber= 9907607474
• The attributes of STORE a re as follows: (e) Remove the table VISITOR from the database HOTEL.
ItemNo – numeric Which command will he used from the following: a)
ItemName – character of size 20 DELETE FROM VISITOR; b) DROP TABLE VISITOR; c) DROP
Scode - numeric DATABASE HOTEL; d) DELETE VISITOR FROM HOTEL;
Quantity – numeric
An organization SoftSolutions is considering to
maintain their employees records using SQL to
store the data. As a database administer,
Murthy has
decided that :
• Name of the database - DATASOFT
• Name of the table – HRDATA
• The attributes of HRDATA are as follows:
ECode – Numeric
(a) Identify the attribute best suitable to be declared as a EName – character of size 30
primary key, Desig – Character of size 15
(b) Write the degree and cardinality of the table STORE Remn – numeric
(c) Insert the following data into the attributes ItemNo, Table: HRDATA
ItemName and SCode respectively in the given table
STORE. ItemNo = 2010, ItemName = “Note Book” and
Scode = 25
(d) Abhay want to remove the table STORE from the
database MyStore. Which command will he use from the
following:
i) DELETE FROM store;
ii) DROP TABLE store;
iii) DROP DATABASE mystore; a) Identify the attribute best suitable to be declared as a
iv) DELETE store FROM mystore; primary key.
(e) Now Abhay wants to display the structure of the table b) Write the degree and cardinality of the table HRDATA,
STORE, i.e, name of the attributes and their respective c) Write command to insert following data in the table:
data types that he has used in the table. Write the query ECode = 80015, Ename = “Allen” Remn = 43000
to display the same. d) Write SQL statement to delete the record of Jeevan
from the table HRDATA
e) Write SQL statement to increase the Remn of all the
employees by 10 percent.