0% found this document useful (0 votes)
16 views11 pages

BD Final

The document outlines a practical examination for Computer Science at D.A.V. Senior Secondary School, covering various programming tasks and SQL queries. Students are required to implement programs for data structures, file handling, and database management using MySQL. Each question has a specific focus, such as stack implementation, series calculations, and database queries, with a total of 30 marks allocated for the practical exam.

Uploaded by

esvaran0718
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views11 pages

BD Final

The document outlines a practical examination for Computer Science at D.A.V. Senior Secondary School, covering various programming tasks and SQL queries. Students are required to implement programs for data structures, file handling, and database management using MySQL. Each question has a specific focus, such as stack implementation, series calculations, and database queries, with a total of 30 marks allocated for the practical exam.

Uploaded by

esvaran0718
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

D.A.V.

SENIOR SECONDARY SCHOOL


COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:

QN QUESTION M
1 Write a program to implement a stack using a list where each 8

element in the list has Country name and capital. The related operations are performed using
user defined functions:
The menu options to be displayed:
1.Push 2. Pop 3. Display stack 4. Peek 5. Exit
4
2 Consider the following tables SCHOOL and ADMIN . Write MYSQL commands for the
statements. Create and use database with your name and create the tables given below and
insert the records using MYSQL. Execute and write the output for the given queries

1)To display TEACHERNAME, PERIODS of all teachers whose periods are more than 25.
2)To display all the information from the table SCHOOL in descending order of experience.
3)To display DESIGNATION without duplicate entries from the table ADMIN.
4)To display TEACHERNAME, CODE and corresponding DESIGNATION from tables SCHOOL
and ADMIN of Male teachers.

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30
D.A.V. SENIOR SECONDARY SCHOOL
COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:

QN QUESTION M
1 Write a program that accepts x and n value from the user to find the sum of the following 8
series:
i) x 1 / 2! – x 3 / 4 ! + x 5 / 6 ! -x 7 / 8! + ……. ‘n’ terms
ii) ii) x 1 / 3! – x 3 / 5 ! + x5 / 7 ! -x 7 / 9! + ……. ‘n’ terms:
Include 2 UDFs Factorial() and Power() to compute the sum of the series .
2
Consider the following tables STUDENTS AND SPORTS . Write MYSQL commands
for the statements. Create and use database with your name and create the tables
given below and insert the records using MYSQL. Execute and write the output for
the given queries

1. To display the name and class for students whose name


ends with ‘a’ from students table
2. To display the details of table sports in descending order of game
from sports table
3. To display the count of each game from table sports
4 To display class,game,coach name from both table based on their
matching admno.

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30
D.A.V. SENIOR SECONDARY SCHOOL
COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:

QN QUESTION M
1 Write a menu driven program to perform the following user defined functions 8
1. Factorial of a number
2. Generate ‘N’ numbers of Fibonacci series
3. Exit
2 Consider the following tables WATCHES and SALE . Write MYSQL 4
commands for the statements. Create and use database with your name
and create the tables given below and insert the records using MYSQL.
Execute and write the output for the given queries

1. To display all the details of those watches whose name ends with
‘time’
2. To display watch’s name and price of those watches which have price
range in between 5000-15000.

3. To display watch name and their quantity sold in first quarter


4. To display the highest price,lowest price of watch from table
watches

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30
D.A.V. SENIOR SECONDARY SCHOOL
COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:

Q QUESTION M
N
1 Write a program to find the largest, second largest and the prime numbers from a list of 8
randomly generated integers
Include 3 UDFs Generate(), Max_SecMax(), Prime() to do the above.

2 Consider the following tables CABHUB and CUSTOMER . Write MYSQL 4


commands for the statements. Create and use database with your name
and create the tables given below and insert the records using MYSQL.
Execute and write the output for the given queries

1)To display the names of all the white coloured vehicles.


2)To display name of vehicle name and capacity of vehicles in ascending
order of their sitting capacity.
3)To display the highest charges at which a vehicle can be hired from
CABHUB.
4)To display the customer name and the corresponding name of the
vehicle hired by them.

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30
D.A.V. SENIOR SECONDARY SCHOOL
COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:

QN QUESTION M
1 Write a menu driven program to create a dictionary to store details of ‘n’ subscribers 8
and perform the menu operations till the user wish.

The menu to be displayed should be:

1. ADD CUSTOMER DETAILS


2. VIEW CUSTOMER DETAILS
3. MODIFY NAME
4. DELETE THE CUSTOMER DETAILS
5. EXIT

4
2 Consider the following tables COMPANY and CUSTOMER . Write MYSQL
commands for the statements. Create and use database with your name and
create the tables given below and insert the records using MYSQL. Execute and
write the output for the given queries

1. To display those company name which are having prize less than
30000.
2. To display the name of the companies in reverse alphabetical order.
3. To increase the prize by 1000 for those customer whose name starts
with “S”
4. To delete the details of those customers where name ends with ‘R’

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30
D.A.V. SENIOR SECONDARY SCHOOL
COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:

Q QUESTION M
N
Write a program to create a text file with contents entered by the user as long as the user 8
wishes to and perform the operations
The menu options to be as follows:
MENU
1. Display number of lines
2. Copy the words containing ‘U’ into another file and display the new file
3. Convert the case of the letters(lower to upper and vice versa) in the original text file and
display the contents
4. Exit
2 Consider the following tables SHOP and ACCESSORIES . Write MYSQL commands 4
for the statements. Create and use database with your name and create the tables
given below and insert the records using MYSQL. Execute and write the output for
the given queries

Table:SHOP
Id SName Area
S00 ABC Computronics CP
1
S00 All Infotech Media GK II
2
S00 Tech Shop CP
3
S00 Geeks Tecno Soft Nehru Place
4 Table:ACCESSORIES
S00 Hitech Tech Store Nehru Place
5
No Name Price Id
A01 Mother Board 12000 S001
A02 Hard Disk 5000 S001
A03 Keytboard 500 S002
A04 Mouse 300 S001
A05 Mother Board 13000 S002
A06 Keyboard 400 S003
A07 LCD 6000 S004
T08 LCD 5500 S005
T09 Mouse 350 S005
T10 Hard Disk 4500 S003

(a) Write the SQL queries:

1. To display Name and Price of all the Accessories in ascending order of


their Price.
2. To display Id and SName of all Shop located in Nehru Place.
3. To display Minimum and Maximum Price of each Name of Accessories.
4. To display SName and Price from the tables based on their
corresponding ids

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 3
0

D.A.V. SENIOR SECONDARY SCHOOL


COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:
QN QUESTION M
1 Write a program to create a Binary file EMPLOYEE.DAT with each record having fields 8
Name, Age, Department , Designation, Salary and perform the operations using a menu
driven code.
The menu options to be as follows:
MENU 1. Display details of Managers earning more than 50000 in Finance and in Admin
Dept.
2. Delete the employee details who have reached retirement age(58 years)
3. Exit
2 Consider the following tables EMPLOYEE and DEPARTMENT . Write MYSQL 4
commands for the statements. Create and use database with your name and
create the tables given below and insert the records using MYSQL. Execute and
write the output for the given queries

1.To display all DepName along with the DepCde in descending order of
DepCde.

2.To display the average age of Employees where DepCde is 103.

3.To display the name of DepHead of the Employee named “Sanjeev P”


from both the tables.

4To display the salary and joined date of employees in the descending
order of their Tname from Table Employee.
REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30

D.A.V. SENIOR SECONDARY SCHOOL


COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:

Q QUESTION M
1 Write a menu driven code to perform the following user defined functions 8
1. Binary Search in a list of integers
2. Reversing a string
3. Exit

2 Consider the following tables WORKER and PAYLEVEL . Write MYSQL 4


commands for the statements. Create and use database with your name and
create the tables given below and insert the records using MYSQL. Execute and
write the output for the given queries

Write SQL commands for the following statements:

1. To display the name of all Workers in descending order of DOB.


2. To display NAME and DESIGN of those Workers, whose PLEVEL is
either P001 or P002
3. To display the content of all the workers from the table WORKER,
whose DOB is in between ’19-JAN- 1984′ and ’18-JAN-1987′.
4. To increase the pay by 10 % where Design is ‘Operator’.

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 3
0
D.A.V. SENIOR SECONDARY SCHOOL
COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:
QN QUESTION M
1 Write a program to create CSV file “GST.CSV” to store 4 records with the following 8
data: CATEGORY GST_PERCENTAGE
Automobiles 25
Stationary 12
Chocolates 10
Dairy 3

A second file ITEMS.CSV” is created to have fields ItemID, Name, Category, Unitprice,
Finalprice. The input for ‘N’ items are read from the user for the first 4 fields. The
Finalprice is computed using the GST.CSV file retrieving the GST% as per the category.
The contents of the completed ITEMS.CSV is then displayed .

2 Consider the following tables STORE and SUPPLIERS. Write MYSQL 4


commands for the statements. Create and use database with your name and
create the tables given below and insert the records using MYSQL. Execute and
write the output for the given queries:

1. To display details of all the items in the STORE table in ascending


order of LastBuy.
2. To display ItemNo and Item name of those items from STORE table
whose Rate is more than 15 Rupees.
3. To display the details of those items whose supplier code (Scode) is
22 or Quantity in Store (Qty) is more than 110 from the table Store.
4. To display minimum Rate of items for each supplier individually as
per Scode from the table STORE.

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30

D.A.V. SENIOR SECONDARY SCHOOL


COMPUTER SCIENCE – PRACTICAL
SUBJECT CODE:083 SCHOOL CODE:55078
DURATION : 3 HRS MAX. MARKS: 30
ROLLNO: DATE:
QN QUESTION M
1 Write a program to implement a Stack using a list of integers and performing the 8
related operations using user defined functions.

The menu options to be displayed:


1. Push
2. Pop
3. Display Stack
4. Peek
5. Exit

2 Consider the following tables SENDER and RECIPIENT. Write MYSQL


commands for the statements. Create and use database with your
name and create the tables given below and insert the records using
MYSQL. Execute and write the output for the given queries

TABLE : SENDER

SenderID SenderName Sender Address Sender City


ND01 R jain 2,ABC Appts New Delhi
MU02 H sinha 12, Newton Mumbai
MU1 5 S haj 27/ A,Park Street New Delhi
ND5 0 T Prasad 122-K,SDA Mumbai

TABLE :RECIPIENT

RecID SenderID ReCName RecAddress ReCCity


KO05 ND01 RBajpayee 5,Central Avenue Kolkata
ND08 MU0 2 S Mahajan 116, A Vihar NewDelhi
MU19 ND01 H sing 2A,Andheri East Mumbai
MU32 MU1 5 PK Swamy B5, CS erminus Mumbai
ND48 ND50 S Tripathi 13, B1 D,Mayur Vihar NewDelhi
(i) To display the names of all senders from Mumbai.

(ii) To display the recID, senderName, senderAddress, RecName,


RecAddress for every recipt.

(iii) To display the sender details in ascending order of SenderName.


(iv) To display number of Recipients from each city.

REPORT FILE 7
PROJECT 8
VIVA 3
TOTAL 30

You might also like