CS Practical File (1)
CS Practical File (1)
SOURCE CODE:
OUTPUT:
1
(b) Insert one record in any of the table given above.
SOURCE CODE:
OUTPUT:
SOURCE CODE:
OUTPUT:
2
(d) Display Itemname, Brand, price, Category name through natural Join.
3
(g) Add Item Id as primary Key in table store_Items
SOURCE CODE:
OUTPUT:
4
(j) Display categoryId wise count of Items.
5
a) To display CNO, CNAME, TRAVELDATE from the table TRAVEL in
descending order of CNO.
6
(b) To display the CNAME of all customers from the table TRAVEL who are
travelling by vehicle with code T01 or T02
(c) To display the CNO and CNAME of those customers from the table
TRAVEL who travelled between '2019-01-06' and '2019-05-01'.
(d) To display all the details from table TRAVEL for the customers, who have
travel distance more than 250 KM in ascending order of NOP (Number of
Passengers)
7
(e) Display average and maximum KM from table Travel.
SOURCE CODE:
OUTPUT:
8
(h) Increase per Km cost by 10 % for all
SOURCE CODE:
OUTPUT:
(i) Display all TaxiType whose name starts and end with “A”
9
(k) Display Total cost to be paid by each customer.
10
3) Write a Python MySQL connectivity program to accept data for the
following structure in python from the user and store the data in form of
Records in MYSQL table Product.
SOURCE CODE:
OUTPUT:
11
4) Write a Python MySQL connectivity program to display all records
belonging to category “Electronics” from MYSQL table Product.
SOURCE CODE:
OUTPUT:
12
5) Write a Python MySQL connectivity program to increase price of items
belonging to category “Electronics” in table PRODUCT.
SOURCE CODE:
OUTPUT:
13
6) Write a Python MySQL connectivity program to delete items having
category as NULL from table PRODUCT.
CURRENT TABLE: (after a few modifications)
SOURCE CODE:
OUTPUT:
14