Vous êtes sur la page 1sur 8

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2.

Write the SQL query answers on the sheet after checking them on the computer. Set-11 Q.1 Write SQL command for the queries given from (a) to (e) based on a relation BANK :
TABLE : BANK Acc_no 1 2 3 4 5 (a) (b) (c) (d) (e) CName Karan Puneet Anirban Yatin Sunny Bname Bank of Baroda State Bank Oriental Bank Standard Charted State Bank Amount 15000 25000 17000 38000 47000 Dateofopen 12/01/98 01/02/97 15/07/99 10/02/99 06/02/98 T_Transactions 10 09 05 11 15

Display data for all Customers whose transaction is between 8 and 11. Display data for all Customers sorted by their dateofopen. To count the number of customers with amount <30000. List the minimum and maximum amount from the BANK. To list Cname, Bname, Amount for all the clients whose amount is <20000.

Q.2 Declare a class student containing - RollNo - Name - Marks - And required functions Write a menu driven program - To create an array of 10 studnets - To display the record in descending order of marks - Also display the highest and lowest scorer.

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2. Write the SQL query answers on the sheet after checking them on the computer. Set-12 Q.1 Write SQL commands for the queries for the questions given from (a) to (e )
TABLE : PRODUCT No. 1 2 3 4 5 6 7 8 Name Motherboard Keyboard Mouse Soundcard Speaker Monitor CD-ROM Printer Price 7000 1000 500 600 600 3000 2800 7900 Supplier Intel TVSE Logitech SAMSUNG SAMSUNG Philips Creative HP Stock 20 70 60 50 25 22 32 10

(a) Display data for the entire item sorted by their name. (b) Display the Name and Price from the table item in reverse order of their stock. (c) List all Name and Price with Price between 3000 and 7000. (d) Write the command to set the price field of all products to 1200 corresponding to NAME = Keyboard. (e) Write the SQL command to delete rows with stock between 20 to 40.

Q.2

Declare a class book containing - bno - bname - price - author Write a menu driven program to - append record in a file - display the name and price of all the books by given author.

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2. Write the SQL query answers on the sheet after checking them on the computer. Set-13 Q.1 Write SQL commands for the queries (a) to (e ) based on a relation SHOP shown below:
TABLE : VOTER V# 1 2 3 4 5 Vname Diwaker Rajiv Smith Arpit Sunny Age 22 23 24 19 26 Address Rohini Sarojini Nagar Paschim Vihar Multan Nagar Dev Nagar Phone 7045249 5567892 5580438 5585643 7123462

(a) Write a SQL statement to list V#, Vname, Age for all the voters. This information should be sorted on Vname. (b) To list all those employees who either reside in Rohini or whose age < 25. (c) Display all the voters with age > 27. (d) List different voters with unique age. (e) Count the number of voters where address is Rohini.

Q,2

A class employee has three data members and few member functions - Name - empno - salary - deptno Write a menu driven program - to create a file - to print tabular report for the gievn department number.

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2. Write the SQL query answers on the sheet after checking them on the computer.

Set-14 Q.1
Family: No. 1 2 3 4 5 6 7 8 (a) (b) (c) (d) (e) Name Mishra Gupta Khan Chaddha Yadav Joshi Maurya Rao FemaleMembers 3 4 6 2 7 3 6 5 MaleMembers 2 1 3 2 2 2 3 2 Income 7000 50000 8000 25000 20000 14000 5000 10000 Occupation service business mixed business mixed service farming service

Write SQL commands for the queries (a) to (e ) based on a relation

To select all the information of family whose occupation is service. To list the name of family where female members are more than 3. To list all names of family with income in ascending order. To display familys name, malemembers and occupation of business family. To count the number of family whose income is less than 10,000.

Q.2

Declare a class garment having - gno - gname - price - required functions Write a menu driven program - to append record in a file delete the record of given gno.

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2. Write the SQL query answers on the sheet after checking them on the computer.

Set-15 Q.1 Write SQL commands for the queries given from (a) to (e ) based on a relation SPORTS
TABLE : SPORTS Student No. 10 11 12 13 14 15 (i) (ii) (iii) (iv) (v) Class 7 8 7 7 9 10 Name Sameer Sujit Kamal Veena Archana Arpit Game1 Cricket Tennis Swimming Tennis Basketball Cricket Grade B A B C A A Game2 Swimming Skating Football Tennis Cricket Athletics Grade1 A C B A A C

Display the names of the students who have grade C in either Game1 or Game2 or both. Display the number of students getting grade A in Cricket. Display the names of the students who have same game for both Game1 and Game2. Display the games taken up by the students, whose name starts with A. Add a new column named Marks.

Q.2

Each node of QUEUE contain - Eno, Salary, Pointer field Front is the first node of QUEUE and REAR is the last node. Write a menu driven program - To add element in the queue - To delete element from the queue

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2. Write the SQL query answers on the sheet after checking them on the computer.

Set-16 Q.1 Write SQL command for the queries given from (a) to (e) based on a relation BANK :
TABLE : BANK Acc_no 1 2 3 4 5 6 7 8 9 (a) (b) (c) (d) (e) CName Karan Puneet Anirban Yatin Sunny Jayant Nikhil Tarun Jisha Bname Bank of Baroda State Bank Oriental Bank Standard Charted State Bank Uco Bank Bank of Baroda Oriental bank Uco Bank Amount 15000 25000 17000 38000 47000 34000 56000 22000 34500 Dateofopen 12/01/98 01/02/97 15/07/99 10/02/99 06/02/98 10/08/98 02/01/99 04/04/99 05/01/98 T_Transactions 10 09 05 11 15 07 12 08 11

Display data for all Customers whose transaction is between 8 and 11. Display data for all Customers sorted by their dateofopen. To count the number of customers with amount <30000. List the minimum and maximum amount from the BANK. To list Cname, Bname, Amount for all the clients whose amount is <20000.

Q.2

Each node of QUEUE contain - Rno, name , Pointer field Front is the first node of QUEUE and REAR is the last node. Write a menu driven program - To add element in the queue - To delete element from the queue

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2. Write the SQL query answers on the sheet after checking them on the computer. Set-17 Q.1 Write SQL commands for the queries for the questions given from (a) to (e )
TABLE : PRODUCT No. 1 2 3 4 5 6 7 8 Name Motherboard Keyboard Mouse Soundcard Speaker Monitor CD-ROM Printer Price 7000 1000 500 600 600 3000 2800 7900 Supplier Intel TVSE Logitech SAMSUNG SAMSUNG Philips Creative HP Stock 20 70 60 50 25 22 32 10

(a) Display data for the entire item sorted by their name. (b) Display the Name and Price from the table item in reverse order of their stock. (c) List all Name and Price with Price between 3000 and 7000. (d) Write the command to set the price field of all products to 1200 corresponding to NAME = Keyboard. (e) Write the SQL command to delete rows with stock between 20 to 40.

Q.2

A blood bank maintains the record of donor: name, address, blood group. Write a menu driven program - create file of donor - print the name of all the donors having given blood group - print the tabular list of donors.

Instructions 1. Execute the C++ program on computer. Take its printout with output. 2. Write the SQL query answers on the sheet after checking them on the computer.

Set-18 Q.1 Write SQL commands for the queries (a) to (e ) based on a relation SHOP shown below:
TABLE : VOTER V# 1 2 3 4 5 6 7 8 9 10 Vname Diwaker Rajiv Smith Arpit Sunny Sumit Rajiv Rohit Anand Vidhi Age 22 23 24 19 26 23 27 24 34 26 Address Rohini Sarojini Nagar Paschim Vihar Multan Nagar Dev Nagar Vikas Puri Rohini Rohini Pitam Pura Bank Vihar Phone 7045249 5567892 5580438 5585643 7123462 5565127 7869845 7057845 7026534 7036713

(a) Write a SQL statement to list V#, Vname, Age for all the voters. This information should be sorted on Vname. (b) To list all those employees who either reside in Rohini or whose age < 25. (c) Display all the voters with age > 27. (d) List different voters with unique age. (e) Count the number of voters where address is Rohini.

Q.2 A bank maintains the record of customer: accno, name, address, current balance. Write a menu driven program - create file of customer - print the tabular list of all the customer - deposit or withdrawthe given amount in the given account number.
8

Vous aimerez peut-être aussi