Amity International School, Sector - 1, Vasundhara SESSION 2021 - 22 Class Xii Database Management (Mysql) - Practical Questions
Amity International School, Sector - 1, Vasundhara SESSION 2021 - 22 Class Xii Database Management (Mysql) - Practical Questions
SESSION 2021 – 22
CLASS XII
1) The given table “Tutor” is shown below , write commands to do the following :
(i) Display name in descending order of those students whose age does not lie between 35 and 40.
(ii) List cities with their average fee in it.
iii) Decrease the fees of shikha by 5%
iv) Display cities where fees is maximum and minimum respectively
v) Display the name and city of tutor who lives in a city with name having ‘O’ but not ‘P’
2. Consider the following WATCHES and SALE table and Write the command in MYSQL for (i)
to (v):
Table: WATCHES
Watchid Watch_Name Price Type Qty_Store
W001 High Time 10000 Unisex 100
W002 LifeTime 15000 Ladies 150
W003 Wave 20000 Gents 200
W004 High Fashion 7000 Unisex 250
W005 Golden Time 2500 Gents 100
Table: SALE
WatchId Qty_Sold Quarter
W001 10 1
W003 5 1
W002 20 2
W003 10 2
W001 15 3
W002 20 3
W005 10 3
W003 15 4
Itemcode varchar
Itemname varchar
Price float
i) Create the table ITEM in the mydb database
ii) Create a menu driven program in python to have
a) function for inserting records in the table
b) function for displaying all the records from the table item
c) Function for searching for a particular record on basis of Itemcode
i) Create a menu driven program in Python for the user to enter the details and save the
data in MySQL table
ii) Allow the user to update the details for a particular rollno and ensure the changes have
been made in the table student.
Table: BUS
ColumnName Datatype Constraint
BusNo Number Primary Key
Origin Varchar
Dest Varchar
Rate Number
Km Number
Now build a connection with Python to add a new record and Display the details in above table. You
may use Tkinter to create the front end.
**********************************************************************************