0% found this document useful (0 votes)
57 views

Class Xii Practical Copy Programs Term2!24!25

Uploaded by

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

Class Xii Practical Copy Programs Term2!24!25

Uploaded by

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

DAV PUBLIC SCHOOL ,BISTUPUR , JAMSHEDPUR

PRACTICAL ASSIGNMENTS FOR TERM2 2024-25


CLASS -XII
NOTE: WRITE ALL TABLES IN PLAIN SIDE AND QUERIES IN RULAR SIDE.
LAST DATE OF SUBMISSION IS 15/12/2024(Wednesday)

1. Write SQL commands for (a) to ( j) on the basis of Teacher relation given below.

a) To show all information about the teacher of history department.


b) To list the names of female teachers who are in Maths department
c) To list names of all teachers with their date of joining in ascending order.
d) To display students name, fee,age for male teacher only
e) To count the number of teachers with age>23.
f) To insert a new row in the TEACHER table with the following data:
9,”Raja”,26,”Computer”,13/05/95,2300,”M”.
g) To show all information about the teachers in this table
h) Add a new column named “Address”.
i) Arrange the whole table in the alphabetical order to name
j) Display the age of the teachers whose name starts with ‘S,.

Q2)

(a) Display names of employees whose names include either of the substring “TH” or “LL”.
(b) Display data of all employees sorted by their deptno, hiredate and salary.
(c) Find all the employees who are not manager.
(d) To display all employees who were hired during 1995.
(e) Show the average salary for all departments with more than 3 people for a job.
(f) Find out number of employees having ‘MANAGER’ as job.
(g) Display department no. and number of employees in each department.

Page 1 of 4
Q3) Consider the following WORKERS and DESIG. Write SQL commands for the statements (i) to
(iv) and give outputs for SQL queries (v) to (viii)
WORKERS

(i) To display W_ID, FIRSTNAME, ADDRESS and CITY of all employees living in NEW
YORK from the table WORKERS.
(ii) To display the content of workers table in ascending order of LASTNAME.
(iii) To display the FIRSTNAME, LASTNAME and total salary of all clerks from the
tables WORKERS and DESIGN, where total salary is calculated as SALARY +
BENEFITS.
(iv) To display the minimum salary among Managers and Clerks from the table DESIG.
(v)To display firstname,lastname,designation for Manager and clerks suing tables workers and desig.

Page 2 of 4
Q4)Write SQL commands for the statements (i) to (vi) on the basis of the table EMPLOYEE:

i. Show sum and average salary for clerks.


ii. Check all employees have unique names.
iii. Find al employess whose deptt is same as of ‘Amit’.
iv. Increase the salary of all employees by 10%,
v. Find the deptt that is paying max salaries to its employees.
vi. Display the details of all the employees having salary less than 10000.
Q5) Write the SQL commands for the following on the basis of tables INTERIORS and NEWONES

(i) To list the ITEMNAME which are priced at more than 1000 from the INTERIORS
table
(ii) To list ITEMNAME and TYPE of those items, in which DATEOFSTOCK is before
22/01/02 from the INTERIORS table in descending order of ITEMNAME
(iii) To show all information about the sofas from the INTERIORS table
(iv) To display ITEMNAME and DATEOF STOCK of those items in which the discount
percentage is more than 15 from INTERIORS table
(v) To count the number of items, whose type is “Double Bed” from INTERIORS table
(vi) To insert a new row in the NEWONES table with the following data
14,”True Indian”, “Office Table”, 28/03/03,15000,20
Page 3 of 4
Q6) Create Python MySQL interface to perform the following through menu driven program using
functions:
Employee Data management
1.Create Table
2. Data Entry
3. Show All records
4 . Show specific No of records
5 . Show records one by one
6. Exit
Databse name: Employee
Table : EMP
Structure of EMP Table
(eno int, ename varchar(20), age int , dept( varchar(20) , doj date , sal float , gen char(1))

Q7)Create Python MySQL interface to perform the following through menu driven program using
functions:
Student Data management
1.Create Table
2. Data Entry
3. Show All records
4 . Fees >2000
5 . Marks between 60-80
6. Exit
Databse name: Student
Table : stud
Structure of stud Table
(rn int, name varchar(10), age int , dept( varchar(10) ), dob date , fees float , marks float , gen char(1))

Q8) Julie has created a dictionary containing names and marks as key value pairs of 6 students.
Write a program, with separate user defined functions to perform the following operations:
● Push the keys (name of the student) of the dictionary into a stack, where the corresponding
value (marks) is greater than 75.
● Pop and display the content of the stack.
For example:
If the sample content of the dictionary is as follows:
R={"OM":76, "JAI":45, "BOB":89, "ALI":65, "ANU":90, "TOM":82}
The output from the program should be:
TOM ANU BOB OM

Q9) Alam has a list containing 10 integers. You need to help him create a program with separate user
defined functions to perform the following operations based on this list.
● Traverse the content of the list and push the even numbers into a stack.
● Pop and display the content of the stack.
For Example:
If the sample Content of the list is as follows:
N=[12, 13, 34, 56, 21, 79, 98, 22, 35, 38]
Sample Output of the code should be:
38 22 98 56 34 12

==================================xxxx================================

Page 4 of 4

You might also like