SlideShare a Scribd company logo
1 of 39
Download to read offline
1
Practical file-
in
Computer Sc.-083
for
Session 2021-22
LOGO OF YOUR SCHOOL
XYZ school , NEW DELhi-110011
2
Certificate
This is to certify that __________________ ,
Roll No. _____ of Class 12th Session 2021-22
has prepared the Practical File as per the
prescribed Practical Syllabus of Computer
Science Code-083, Class-12 AISSCE (CBSE)
under my supervision.
It is the original work done by him/her. His/ her
work is really appreciable.
I wish him/her a very bright success.
__________________
Signature of Teacher.
__________________
Signature of External
3
Index
S.No. Practical Description Page
No.
Date Teacher's
Sign.
1 Practical No. -1
2 Practical No. -2
3 Practical No. -3
4 Practical No. -4
5 Practical No. -5
6 Practical No. -6
7 Practical No. -7
8 Practical No. -8
9 Practical No. -9
10 Practical No. -10
11 Practical No. -11
12 Practical No. -12
13 Practical No. -13
14 Practical No. -14
15 Practical No. -15
16 Practical No. -16
17 Practical No. -17
18 Practical No. -18
19 Practical No. -19
20 Practical No. -20
21 Practical No. -21
22 Practical No. -22
23 Practical No. -23
24 Practical No. -24
25 Practical No. -25
4
26 Practical No. -26
27 Practical No. - 27
28 Practical No. -28
29 Practical No. -29
30 Practical No. -30
31 Practical No. -31
5
MySQL- SQL Commands
6
Practical No-1
Date: 27/12/2021
Problem- Create a database 'csfile' on the database server, show the list of databases and
open it.
Solution :
> create database csfile;
> show databases;
> use csfile;
Command and output ( Screenshot ) :
7
Practical No-2
Date: 27/12/2021
Problem- Create the following table named 'Dept' and 'Emp' with appropriate data type, size
and constraint(s). Show its table structure also.
Solution :
create table dept(deptno int(2) primary key, dname varchar(10),
Location varchar(15));
Table structure:
Command : desc dept;
create table Emp(Empno int(4) primary key, Ename varchar(15) not null,
Job varchar(10), MGR int(4), Hiredate date, Sal double(8,2) check (sal>10000),
Comm double(7,2), Deptno int(2) references Dept(deptno));
8
Practical No-3
Date: 27/12/2021
Problem- insert few records/tuples into the table. Verify the entered records.
Solution :
insert into dept values(10, 'Accounts', 'Delhi');
Note : issued similar commands for other records.
9
10
Practical No-4
Date: 28/12/2021
Problem- Display all the information of employees whose job is NEITHER Manager nor Clerk.
Solution-
select * from emp where job not in ('Manager', 'Clerk');
11
Practical No-5
Date: 28/12/2021
Problem- Display the details of all the employees whose Hiredate is after December 1991.
(consider the Sql’s standard date format)
Solution:
select * from student where Hiredate>'1991-12-31';
Practical No-6
Date: 28/12/2021
Problem- Display the details of all the employees whose Hiredate is maximum. (consider the Sql’s
standard date format)
Solution:
select * from emp where Hiredate=(select max(hiredate) from emp);
12
Practical No-7
Date: 29/12/2021
Problem- Display all information of Clerk and Manager in descending salary wise.
Solution:
select * from emp where job in('Clerk','Manager') order by sal desc;
OR
select * from emp where job ='Clerk' or job='Manager' order by sal desc;
13
Practical No-8
Date: 29/12/2021
Problem-Display all columns arranged in descending order of Job and within the Job in the ascending
order their Names.
Solution:
select * from emp order by Job desc, Sal;
14
Practical No-9
Date: 10/01/2022
Problem- List all employees whose name has the character ‘a’.
Solution:
Select * from emp where Ename like '%a%';
15
Practical No-10
Date: 10/01/2022
Problem- Display Name and Salary of those Employees whose Salary is in the range 40000 and
100000 ( both are inclusive)
Solution:
select EName, Sal from Emp where Sal between 40000 and 100000;
16
Practical No-11
Date: 11/01/2022
Problem- Display those records whose commission is nothing.
Solution:
select * from emp where Comm is null;
17
Practical No-12
Date: 11/01/2022
Problem- Display average Salary, highest Salary and total no. of Employees for each
department.
Solution:
Select deptno, avg(Sal), Max(Sal), Count(*), from Emp group by deptno;
Practical No-13
Date: 11/01/2022
Problem- Display total no of Clerk, Manager, Analyst, Salesman and Salesman along with their average
Salary.
Solution:
Select Job, count(*), avg(Sal) from Emp group by Job;
18
Practical No-14
Date: 12/01/2022
Problem- Increase the Salary of 'Clerk' by 5% Sal and verify the updated rows.
Solution:
update Emp set Sal=Sal+(Sal*0.05) where Job = 'Clerk';
19
Practical No-15
Date: 12/01/2022
Problem- Add a new column named Address. ( Take the data type and size yourself) and
verify the table structure.
Solution:
Alter table Emp add address varchar(25);
Practical No-16
Date: 12/01/2022
Problem- Delete the column Address and verify the table structure.
Solution:
Alter table Emp drop column Address;
20
Practical No-17
Date: 13/01/2022
Problem- Display Ename, job, salary and Hiredate of 'Analysts' whose Salary is below 65000
Solution:
Select EName, Job, Salary, Hiredate from Emp where Job='Analyst' and Sal<65000;
Practical No-18
Date: 13/01/2022
Problem- Display unique Jobs.
Solution:
Select distinct Job from Emp;
21
Practical No-19
Date: 13/01/2022
Problem- Display Job and highest Salary of Employee of each type of Job, but only for Clerk
and Manager.
Solution:
Select Job, max(Sal) from Emp group by Job having Job in('Clerk','Manager');
Practical No-20
Date: 14/01/2022
Problem- Display Job and highest Salary of Employee of each type of Job, but only for Clerk,
Manager and Analyst arranged in ascending order of job.
Solution:
Select Job, max(Sal) from Emp group by Job having Job in('Clerk','Manager','Analyst') order
by job;
22
Practical No-21
Date: 14/01/2022
Problem- Find the Cartesian product of both the tables, Emp and Dept.
Solution:
Select * from emp cross join Dept;
23
24
Practical No-22
Date: 14/01/2022
Problem- Write a query to display corresponding information from both the tables using equi-join.
Solution:
Select * from emp, dept where emp.deptno=dept.deptno;
25
Practical No-23
Date: 14/01/2022
Problem- Write a query to display Ename, Job and Salary from Emp and its corresponding Dname
and Location from Dept tables using equi-join.
Solution:
Select Ename, Job, Sal, Dname,Location from emp, dept where emp.deptno=dept.deptno;
26
Practical No-24
Date: 14/01/2022
Problem- Write a query to display corresponding information from both the tables using natural join.
Solution:
Select * from emp natural join dept;
27
Practical No-25
Date: 14/01/2022
Problem- Write a query to display corresponding information from both the tables using natural join.
Solution:
Select * from emp natural join dept order by Ename;
28
Python Segment
29
Practical No-26 (STACK)
Date: 15/01/2022
Problem : Write a program to show push and pop operation using stack.
Solution:
#stack.py
def push(stack,x): #function to add element at the end of list
stack.append(x)
def pop(stack): #function to remove last element from list
n = len(stack)
if(n<=0):
print("Sorry! Stack empty......")
else:
num=stack.pop()
print(num, "is popped out..")
def display(stack): #function to display stack entry
if len(stack)<=0:
print("Sorry! Stack empty.....")
for i in stack:
print(i,end=" ")
#main program starts from here
x=[]
choice=0
while (choice!=4):
print("n********STACK Menu***********")
print("1. push(INSERTION)")
print("2. pop(DELETION)")
print("3. Display ")
print("4. Exit")
choice = int(input("Enter your choice :"))
if(choice==1):
ans='y'
while ans.upper()=='Y':
value = int(input("Enter a value "))
push(x,value)
ans=input('Push more(y/n):')
if ans.upper()=='N':
30
break
if(choice==2):
pop(x)
if(choice==3):
display(x)
if(choice==4):
print("You selected to close this program")
OUTPUT:
31
32
33
34
Practical No-27 (PYTHON CONNECTIVITY)
Date: 16/01/2022
Problem : Write a Program to show MySQL database connectivity in python.
PROGRAM:
import mysql.connector as conn
mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile")
# create new cursor
cur=mydb.cursor()
qry1="select * from emp"
cur.execute(qry1)
data=cur.fetchall()
print(data)
OUTPUT:
35
Practical No-28 (PYTHON CONNECTIVITY)
Date: 17/01/2022
Problem : Write a Program to show how to retrieve records from a database table Emp using
MySQL database connectivity in python.
PROGRAM:
import mysql.connector as conn
try:
mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile")
# create new cursor
cur=mydb.cursor()
qry1="select * from emp"
cur.execute(qry1)
data=cur.fetchall()
print ("EmpNo Emp Name Job MgrNO Hiredate Salary Commission DeptNo")
print("-"*80)
for cols in data:
eno = cols[0]
enm = cols[1]
jb =cols[2]
mg=cols[3]
hdt=cols[4]
sl=cols[5]
com=cols[6]
dpt=cols[7]
print (eno,enm,jb,mg,hdt,sl,com,dpt)
print("-"*80)
except:
print ("Error: unable to fecth data")
mydb.close()
36
OUTPUT:
37
Practical No-29 (PYTHON CONNECTIVITY)
Date: 18/01/2022
Problem : Write a Program to show how to add records in a database table Emp using
MySQL database connectivity in python.
PROGRAM:
import mysql.connector as conn
mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile")
# create new cursor
cur=mydb.cursor()
eno=int(input("Enter Employee number : "))
enm=input('Enter Employee Name : ')
jb=input("Enter Job: ")
mg=int(input("Enter Manager No : "))
hdt=input("Enter Hiredate (yyyy-mm-dd) : ")
sl=float(input('Enter Salary : '))
com=float(input('Enter Commission : '))
dpt=int(input("Enter Deptt. No : "))
sql="INSERT INTO emp VALUES ('%d', '%s' ,'%s','%d','%s','%f','%f','%d')" %(eno,enm,
jb,mg,hdt, sl,com, dpt)
try:
cur.execute(sql)
print("One row entered successfully...")
mydb.commit()
except:
mydb.rollback()
mydb.close()
OUTPUT:
38
Practical No-30 (PYTHON CONNECTIVITY)
Date: 19/01/2022
Problem : Write a Program to show how to update a record in a database table Emp using
MySQL database connectivity in python.
PROGRAM:
import mysql.connector as conn
mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile")
# create new cursor
cur=mydb.cursor()
eno=int(input("Enter Employee number : "))
sl=float(input('Enter Salary : '))
sql="update emp set sal=%f where empno=%d" % (sl,eno)
try:
ans=input("Are you sure you want to update the record : ")
if ans=='y' or ans=='Y':
cur.execute(sql)
print("Emp no-",eno," salary updated successfully...")
mydb.commit()
except Exception as e:
print("Error! Perhaps Emp no is incorrect...",e)
mydb.rollback()
mydb.close()
OUTPUT:
39
Practical No-31 (PYTHON CONNECTIVITY)
Date: 20/01/2022
Problem : Write a Program to show how to DELETE a record from a database table Emp using
MySQL database connectivity in python.
PROGRAM:
import mysql.connector as conn
mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile")
# create new cursor
cur=mydb.cursor()
eno=int(input("Enter Employee number : "))
sql="delete from emp where empno=%d" % (eno)
try:
ans=input("Are you sure you want to delete the record : ")
if ans=='y' or ans=='Y':
cur.execute(sql)
print("Emp no-",eno," record deleted successfully...")
mydb.commit()
except Exception as e:
print("Error! Perhaps Emp no is incorrect...",e)
mydb.rollback()
mydb.close()
OUTPUT:
Teacher's Signature:
_____________________

More Related Content

What's hot

Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)KushShah65
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking systemAnurag Yadav
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingHarsh Kumar
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THSHAJUS5
 
Ip library management project
Ip library management projectIp library management project
Ip library management projectAmazShopzone
 
Computer science project work
Computer science project workComputer science project work
Computer science project workrahulchamp2345
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In PythonAbhishekKumarMorla
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)lokesh meena
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSESylvester Correya
 
computer science project class 12th
computer science project class 12thcomputer science project class 12th
computer science project class 12thNitesh Kushwaha
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science ProjectAshwin Francis
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdfHarshitSachdeva17
 
Computer project final for class 12 Students
Computer project final for class 12 StudentsComputer project final for class 12 Students
Computer project final for class 12 StudentsShahban Ali
 
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18HIMANSHU .
 
Informatics Practices Project on Tour and travels
 Informatics Practices Project on Tour and travels  Informatics Practices Project on Tour and travels
Informatics Practices Project on Tour and travels Harsh Mathur
 
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)Anushka Rai
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
chemistry project for class 12 on analysis of honey
chemistry project for class 12 on analysis of honeychemistry project for class 12 on analysis of honey
chemistry project for class 12 on analysis of honeyRadha Gupta
 
Computer Science Practical File class XII
Computer Science Practical File class XIIComputer Science Practical File class XII
Computer Science Practical File class XIIYugenJarwal
 

What's hot (20)

Ip project
Ip projectIp project
Ip project
 
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
 
computer science project on movie booking system
computer science project on movie booking systemcomputer science project on movie booking system
computer science project on movie booking system
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
 
Ip library management project
Ip library management projectIp library management project
Ip library management project
 
Computer science project work
Computer science project workComputer science project work
Computer science project work
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In Python
 
Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)
 
IP Project for Class 12th CBSE
IP Project for Class 12th CBSEIP Project for Class 12th CBSE
IP Project for Class 12th CBSE
 
computer science project class 12th
computer science project class 12thcomputer science project class 12th
computer science project class 12th
 
12th CBSE Computer Science Project
12th CBSE Computer Science Project12th CBSE Computer Science Project
12th CBSE Computer Science Project
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdf
 
Computer project final for class 12 Students
Computer project final for class 12 StudentsComputer project final for class 12 Students
Computer project final for class 12 Students
 
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
COMPUTER SCIENCE INVESTIGATORY PROJECT 2017-18
 
Informatics Practices Project on Tour and travels
 Informatics Practices Project on Tour and travels  Informatics Practices Project on Tour and travels
Informatics Practices Project on Tour and travels
 
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
PHYSICAL EDUCATION PRACTICAL FILE ( Class 12th)
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
chemistry project for class 12 on analysis of honey
chemistry project for class 12 on analysis of honeychemistry project for class 12 on analysis of honey
chemistry project for class 12 on analysis of honey
 
Computer Science Practical File class XII
Computer Science Practical File class XIIComputer Science Practical File class XII
Computer Science Practical File class XII
 

Similar to Complete practical file of class xii cs 2021-22

Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015dezyneecole
 
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole CollegeDivyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole Collegedezyneecole
 
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
 Apurv Gupta, BCA ,Final year , Dezyne E'cole College Apurv Gupta, BCA ,Final year , Dezyne E'cole College
Apurv Gupta, BCA ,Final year , Dezyne E'cole Collegedezyneecole
 
Nikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd YearNikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd Yeardezyneecole
 
Pooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer ApplicationPooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer Applicationdezyneecole
 
Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015dezyneecole
 
Simran kaur,BCA Final Year 2015
Simran kaur,BCA Final Year 2015Simran kaur,BCA Final Year 2015
Simran kaur,BCA Final Year 2015dezyneecole
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxgilpinleeanna
 
METHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptx
METHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptxMETHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptx
METHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptxDanielEssien9
 
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Alpro
 
Complex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxComplex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxmetriohanzel
 
Basic Deep Learning.pptx
Basic Deep Learning.pptxBasic Deep Learning.pptx
Basic Deep Learning.pptxmabog44
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchartfika sweety
 
Programada chapter 4
Programada chapter 4Programada chapter 4
Programada chapter 4abdallaisse
 
Database Project of a Corporation or Firm
Database Project of a Corporation or Firm Database Project of a Corporation or Firm
Database Project of a Corporation or Firm Saqib Nadeem
 
ODS Data Sleuth: Tracking Down Calculated Fields in Banner
ODS Data Sleuth: Tracking Down Calculated Fields in BannerODS Data Sleuth: Tracking Down Calculated Fields in Banner
ODS Data Sleuth: Tracking Down Calculated Fields in BannerBryan L. Mack
 

Similar to Complete practical file of class xii cs 2021-22 (20)

Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015Vishwajeet Sikhwal ,BCA,Final Year 2015
Vishwajeet Sikhwal ,BCA,Final Year 2015
 
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole CollegeDivyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
Divyansh Mehta,BCA Final Year 2015 ,Dezyne E'cole College
 
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
 Apurv Gupta, BCA ,Final year , Dezyne E'cole College Apurv Gupta, BCA ,Final year , Dezyne E'cole College
Apurv Gupta, BCA ,Final year , Dezyne E'cole College
 
Nikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd YearNikhil Khandelwal BCA 3rd Year
Nikhil Khandelwal BCA 3rd Year
 
Pooja Jain
Pooja JainPooja Jain
Pooja Jain
 
Pooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer ApplicationPooja Bijawat,Bachelor Degree in Computer Application
Pooja Bijawat,Bachelor Degree in Computer Application
 
Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015Priyanka Bhatia.BCA Final year 2015
Priyanka Bhatia.BCA Final year 2015
 
Vijay Kumar
Vijay KumarVijay Kumar
Vijay Kumar
 
Simran kaur,BCA Final Year 2015
Simran kaur,BCA Final Year 2015Simran kaur,BCA Final Year 2015
Simran kaur,BCA Final Year 2015
 
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docxMSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
MSCD650 Final Exam feedback FormMSCD650 Final Exam Grading For.docx
 
METHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptx
METHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptxMETHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptx
METHODOLOGY FOR SOLVING EMPLOYEE ATTRITION PROBLEM- Daniel Essien.pptx
 
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
Computer paper 3 may june 2004 9691 cambridge General Certificate of educatio...
 
Complex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptxComplex Queries using MYSQL00123211.pptx
Complex Queries using MYSQL00123211.pptx
 
Basic Deep Learning.pptx
Basic Deep Learning.pptxBasic Deep Learning.pptx
Basic Deep Learning.pptx
 
@elemorfaruk
@elemorfaruk@elemorfaruk
@elemorfaruk
 
Pseudocode algorithim flowchart
Pseudocode algorithim flowchartPseudocode algorithim flowchart
Pseudocode algorithim flowchart
 
Programada chapter 4
Programada chapter 4Programada chapter 4
Programada chapter 4
 
Database Project of a Corporation or Firm
Database Project of a Corporation or Firm Database Project of a Corporation or Firm
Database Project of a Corporation or Firm
 
ODS Data Sleuth: Tracking Down Calculated Fields in Banner
ODS Data Sleuth: Tracking Down Calculated Fields in BannerODS Data Sleuth: Tracking Down Calculated Fields in Banner
ODS Data Sleuth: Tracking Down Calculated Fields in Banner
 
newsql
newsqlnewsql
newsql
 

Recently uploaded

How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111GangaMaiya1
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Pooja Bhuva
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answersdalebeck957
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationNeilDeclaro1
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17Celine George
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structuredhanjurrannsibayan2
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 

Recently uploaded (20)

How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111Details on CBSE Compartment Exam.pptx1111
Details on CBSE Compartment Exam.pptx1111
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
Beyond_Borders_Understanding_Anime_and_Manga_Fandom_A_Comprehensive_Audience_...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
latest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answerslatest AZ-104 Exam Questions and Answers
latest AZ-104 Exam Questions and Answers
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Basic Intentional Injuries Health Education
Basic Intentional Injuries Health EducationBasic Intentional Injuries Health Education
Basic Intentional Injuries Health Education
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17How to Manage Call for Tendor in Odoo 17
How to Manage Call for Tendor in Odoo 17
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 

Complete practical file of class xii cs 2021-22

  • 1. 1 Practical file- in Computer Sc.-083 for Session 2021-22 LOGO OF YOUR SCHOOL XYZ school , NEW DELhi-110011
  • 2. 2 Certificate This is to certify that __________________ , Roll No. _____ of Class 12th Session 2021-22 has prepared the Practical File as per the prescribed Practical Syllabus of Computer Science Code-083, Class-12 AISSCE (CBSE) under my supervision. It is the original work done by him/her. His/ her work is really appreciable. I wish him/her a very bright success. __________________ Signature of Teacher. __________________ Signature of External
  • 3. 3 Index S.No. Practical Description Page No. Date Teacher's Sign. 1 Practical No. -1 2 Practical No. -2 3 Practical No. -3 4 Practical No. -4 5 Practical No. -5 6 Practical No. -6 7 Practical No. -7 8 Practical No. -8 9 Practical No. -9 10 Practical No. -10 11 Practical No. -11 12 Practical No. -12 13 Practical No. -13 14 Practical No. -14 15 Practical No. -15 16 Practical No. -16 17 Practical No. -17 18 Practical No. -18 19 Practical No. -19 20 Practical No. -20 21 Practical No. -21 22 Practical No. -22 23 Practical No. -23 24 Practical No. -24 25 Practical No. -25
  • 4. 4 26 Practical No. -26 27 Practical No. - 27 28 Practical No. -28 29 Practical No. -29 30 Practical No. -30 31 Practical No. -31
  • 6. 6 Practical No-1 Date: 27/12/2021 Problem- Create a database 'csfile' on the database server, show the list of databases and open it. Solution : > create database csfile; > show databases; > use csfile; Command and output ( Screenshot ) :
  • 7. 7 Practical No-2 Date: 27/12/2021 Problem- Create the following table named 'Dept' and 'Emp' with appropriate data type, size and constraint(s). Show its table structure also. Solution : create table dept(deptno int(2) primary key, dname varchar(10), Location varchar(15)); Table structure: Command : desc dept; create table Emp(Empno int(4) primary key, Ename varchar(15) not null, Job varchar(10), MGR int(4), Hiredate date, Sal double(8,2) check (sal>10000), Comm double(7,2), Deptno int(2) references Dept(deptno));
  • 8. 8 Practical No-3 Date: 27/12/2021 Problem- insert few records/tuples into the table. Verify the entered records. Solution : insert into dept values(10, 'Accounts', 'Delhi'); Note : issued similar commands for other records.
  • 9. 9
  • 10. 10 Practical No-4 Date: 28/12/2021 Problem- Display all the information of employees whose job is NEITHER Manager nor Clerk. Solution- select * from emp where job not in ('Manager', 'Clerk');
  • 11. 11 Practical No-5 Date: 28/12/2021 Problem- Display the details of all the employees whose Hiredate is after December 1991. (consider the Sql’s standard date format) Solution: select * from student where Hiredate>'1991-12-31'; Practical No-6 Date: 28/12/2021 Problem- Display the details of all the employees whose Hiredate is maximum. (consider the Sql’s standard date format) Solution: select * from emp where Hiredate=(select max(hiredate) from emp);
  • 12. 12 Practical No-7 Date: 29/12/2021 Problem- Display all information of Clerk and Manager in descending salary wise. Solution: select * from emp where job in('Clerk','Manager') order by sal desc; OR select * from emp where job ='Clerk' or job='Manager' order by sal desc;
  • 13. 13 Practical No-8 Date: 29/12/2021 Problem-Display all columns arranged in descending order of Job and within the Job in the ascending order their Names. Solution: select * from emp order by Job desc, Sal;
  • 14. 14 Practical No-9 Date: 10/01/2022 Problem- List all employees whose name has the character ‘a’. Solution: Select * from emp where Ename like '%a%';
  • 15. 15 Practical No-10 Date: 10/01/2022 Problem- Display Name and Salary of those Employees whose Salary is in the range 40000 and 100000 ( both are inclusive) Solution: select EName, Sal from Emp where Sal between 40000 and 100000;
  • 16. 16 Practical No-11 Date: 11/01/2022 Problem- Display those records whose commission is nothing. Solution: select * from emp where Comm is null;
  • 17. 17 Practical No-12 Date: 11/01/2022 Problem- Display average Salary, highest Salary and total no. of Employees for each department. Solution: Select deptno, avg(Sal), Max(Sal), Count(*), from Emp group by deptno; Practical No-13 Date: 11/01/2022 Problem- Display total no of Clerk, Manager, Analyst, Salesman and Salesman along with their average Salary. Solution: Select Job, count(*), avg(Sal) from Emp group by Job;
  • 18. 18 Practical No-14 Date: 12/01/2022 Problem- Increase the Salary of 'Clerk' by 5% Sal and verify the updated rows. Solution: update Emp set Sal=Sal+(Sal*0.05) where Job = 'Clerk';
  • 19. 19 Practical No-15 Date: 12/01/2022 Problem- Add a new column named Address. ( Take the data type and size yourself) and verify the table structure. Solution: Alter table Emp add address varchar(25); Practical No-16 Date: 12/01/2022 Problem- Delete the column Address and verify the table structure. Solution: Alter table Emp drop column Address;
  • 20. 20 Practical No-17 Date: 13/01/2022 Problem- Display Ename, job, salary and Hiredate of 'Analysts' whose Salary is below 65000 Solution: Select EName, Job, Salary, Hiredate from Emp where Job='Analyst' and Sal<65000; Practical No-18 Date: 13/01/2022 Problem- Display unique Jobs. Solution: Select distinct Job from Emp;
  • 21. 21 Practical No-19 Date: 13/01/2022 Problem- Display Job and highest Salary of Employee of each type of Job, but only for Clerk and Manager. Solution: Select Job, max(Sal) from Emp group by Job having Job in('Clerk','Manager'); Practical No-20 Date: 14/01/2022 Problem- Display Job and highest Salary of Employee of each type of Job, but only for Clerk, Manager and Analyst arranged in ascending order of job. Solution: Select Job, max(Sal) from Emp group by Job having Job in('Clerk','Manager','Analyst') order by job;
  • 22. 22 Practical No-21 Date: 14/01/2022 Problem- Find the Cartesian product of both the tables, Emp and Dept. Solution: Select * from emp cross join Dept;
  • 23. 23
  • 24. 24 Practical No-22 Date: 14/01/2022 Problem- Write a query to display corresponding information from both the tables using equi-join. Solution: Select * from emp, dept where emp.deptno=dept.deptno;
  • 25. 25 Practical No-23 Date: 14/01/2022 Problem- Write a query to display Ename, Job and Salary from Emp and its corresponding Dname and Location from Dept tables using equi-join. Solution: Select Ename, Job, Sal, Dname,Location from emp, dept where emp.deptno=dept.deptno;
  • 26. 26 Practical No-24 Date: 14/01/2022 Problem- Write a query to display corresponding information from both the tables using natural join. Solution: Select * from emp natural join dept;
  • 27. 27 Practical No-25 Date: 14/01/2022 Problem- Write a query to display corresponding information from both the tables using natural join. Solution: Select * from emp natural join dept order by Ename;
  • 29. 29 Practical No-26 (STACK) Date: 15/01/2022 Problem : Write a program to show push and pop operation using stack. Solution: #stack.py def push(stack,x): #function to add element at the end of list stack.append(x) def pop(stack): #function to remove last element from list n = len(stack) if(n<=0): print("Sorry! Stack empty......") else: num=stack.pop() print(num, "is popped out..") def display(stack): #function to display stack entry if len(stack)<=0: print("Sorry! Stack empty.....") for i in stack: print(i,end=" ") #main program starts from here x=[] choice=0 while (choice!=4): print("n********STACK Menu***********") print("1. push(INSERTION)") print("2. pop(DELETION)") print("3. Display ") print("4. Exit") choice = int(input("Enter your choice :")) if(choice==1): ans='y' while ans.upper()=='Y': value = int(input("Enter a value ")) push(x,value) ans=input('Push more(y/n):') if ans.upper()=='N':
  • 31. 31
  • 32. 32
  • 33. 33
  • 34. 34 Practical No-27 (PYTHON CONNECTIVITY) Date: 16/01/2022 Problem : Write a Program to show MySQL database connectivity in python. PROGRAM: import mysql.connector as conn mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile") # create new cursor cur=mydb.cursor() qry1="select * from emp" cur.execute(qry1) data=cur.fetchall() print(data) OUTPUT:
  • 35. 35 Practical No-28 (PYTHON CONNECTIVITY) Date: 17/01/2022 Problem : Write a Program to show how to retrieve records from a database table Emp using MySQL database connectivity in python. PROGRAM: import mysql.connector as conn try: mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile") # create new cursor cur=mydb.cursor() qry1="select * from emp" cur.execute(qry1) data=cur.fetchall() print ("EmpNo Emp Name Job MgrNO Hiredate Salary Commission DeptNo") print("-"*80) for cols in data: eno = cols[0] enm = cols[1] jb =cols[2] mg=cols[3] hdt=cols[4] sl=cols[5] com=cols[6] dpt=cols[7] print (eno,enm,jb,mg,hdt,sl,com,dpt) print("-"*80) except: print ("Error: unable to fecth data") mydb.close()
  • 37. 37 Practical No-29 (PYTHON CONNECTIVITY) Date: 18/01/2022 Problem : Write a Program to show how to add records in a database table Emp using MySQL database connectivity in python. PROGRAM: import mysql.connector as conn mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile") # create new cursor cur=mydb.cursor() eno=int(input("Enter Employee number : ")) enm=input('Enter Employee Name : ') jb=input("Enter Job: ") mg=int(input("Enter Manager No : ")) hdt=input("Enter Hiredate (yyyy-mm-dd) : ") sl=float(input('Enter Salary : ')) com=float(input('Enter Commission : ')) dpt=int(input("Enter Deptt. No : ")) sql="INSERT INTO emp VALUES ('%d', '%s' ,'%s','%d','%s','%f','%f','%d')" %(eno,enm, jb,mg,hdt, sl,com, dpt) try: cur.execute(sql) print("One row entered successfully...") mydb.commit() except: mydb.rollback() mydb.close() OUTPUT:
  • 38. 38 Practical No-30 (PYTHON CONNECTIVITY) Date: 19/01/2022 Problem : Write a Program to show how to update a record in a database table Emp using MySQL database connectivity in python. PROGRAM: import mysql.connector as conn mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile") # create new cursor cur=mydb.cursor() eno=int(input("Enter Employee number : ")) sl=float(input('Enter Salary : ')) sql="update emp set sal=%f where empno=%d" % (sl,eno) try: ans=input("Are you sure you want to update the record : ") if ans=='y' or ans=='Y': cur.execute(sql) print("Emp no-",eno," salary updated successfully...") mydb.commit() except Exception as e: print("Error! Perhaps Emp no is incorrect...",e) mydb.rollback() mydb.close() OUTPUT:
  • 39. 39 Practical No-31 (PYTHON CONNECTIVITY) Date: 20/01/2022 Problem : Write a Program to show how to DELETE a record from a database table Emp using MySQL database connectivity in python. PROGRAM: import mysql.connector as conn mydb=conn.connect(host="localhost",user="root",passwd="tiger",database="csfile") # create new cursor cur=mydb.cursor() eno=int(input("Enter Employee number : ")) sql="delete from emp where empno=%d" % (eno) try: ans=input("Are you sure you want to delete the record : ") if ans=='y' or ans=='Y': cur.execute(sql) print("Emp no-",eno," record deleted successfully...") mydb.commit() except Exception as e: print("Error! Perhaps Emp no is incorrect...",e) mydb.rollback() mydb.close() OUTPUT: Teacher's Signature: _____________________