xii_ip_practicals_2015-16 - Kendriya Vidyalaya No.1 Armapur

advertisement
SQL PRACTICAL FILE FOR THE SESSION 2015-16
Index for SQL
Name: _____________________________Section: ___
RNo.
Descriptions/Topics
Date
1
Introduction to database
About database
2
About keys
Primary key, foreign key, candidate
key
3
Database creation, deletion
4
DATA BASE TRANSACTION
5
Sql commands for club table
Create table, insert, select, sql
functions
6
Sql commands for student
table
Create table,insert,select,sql
functions
7
Sql commands FOR SENDER
TABLE
Question-3
8
Sql commands FOR RECIPIENT
TABLE
Question-3
9
About front end and back end
design
10
Create a java application
Roll No.: ____
front end and back end design
Sign.
Question No-1— Write SQL commands for the following on the basis of the given table CLUB.
TABLE-CLUB
COACH_ID
COACHNAME
AGE
SPORTS
DATEOFAPP
PAY
1
KUKREJA
35
KARATE
27/03/1996
1000
2
RAVINA
34
KARATE
20/01/1998
1200
3
KARAN
34
SQUASH
19/02/1998
2000
4
TARUN
33
BASKETBALL
01/01/1998
1500
5
ZUBIN
36
SWIMMING
12/01/1998
750
6
KETAKI
36
SWIMMING
24/02/1998
800
7
ANKITA
39
SQUASH
20/02/1998
2200
8
ZAREEN
37
KARATE
22/02/1998
1100
9
KUSH
41
SWIMMING
13/01/1998
900
SEX
M
F
M
M
M
F
F
F
M
10
SHAILYA
37
BASKETBALL
19/02/1998
1700
M
a)
b)
c)
d)
To Show all information about the swimming coaches in the club.
To list names of all coaches with their date of appointment (DATEOFAPP) in descending order.
To display a report, showing coach name, pay, age and bonus (15% of pay) for all the coaches.
Give the output of the following SQL statements:
i. SELECT LCASE(SPORTS) FROM CLUB;
ii. SELECT MOD(AGE,5) FROM CLUB WHERE SEX=’F’;
iii. SELECT POWER(3,2) FROM CLUB WHERE SPORTS=’KARATE’;
iv. SELECT SubStr(COACHNAME,1,2) FROM CLUB WHERE DATEOFAPP>’31/01/1998’;
e) Give the output of the following SQL statements:
i. SELECT COUNT (DISTINCT SPORTS) FROM CLUB;
v. SELECT MIN(AGE) FROM CLUB WHERE SEX=’F’;
vi. SELECT AVG(PAY) FROM CLUB WHERE SPORTS=’KARATE’;
vii. SELECT SUM(PAY) FROM CLUB WHERE DATEOFAPP>’31/01/1998’;
Question No-2— Write SQL commands for the following on the basis of the given table STUDENT.
TABLE-STUDENT
No.
1
2
3
4
5
6
7
8
9
10
a)
b)
c)
d)
Name
KARAN
DIVAKAR
DIVYA
ARUN
SABINA
JOHN
ROBERT
RUBINA
VIKAS
MOHAN
Stipend
400.00
450.00
300.00
350.00
500.00
400.00
250.00
450.00
500.00
300.00
Stream
Medical
Commerce
Commerce
Humanities
Nonmedical
Medical
Humanities
Nonmedical
Nonmedical
Commerce
AvgMark
78.5
89.2
68.6
73.1
90.6
75.4
64.4
88.5
92.0
67.5
Grade
B
A
C
B
A
B
C
A
A
C
Class
12B
11C
12C
12C
11A
12B
11A
12A
12A
12C
Select the entire Nonmedical stream from STUDENT.
List the names of those students who are in class 12 sorted by Stipend.
List all students sorted by AvgMark in descending order.
To display a report, listing Name, Stipend, Stream and amount of Stipend received in a year assuming that the
Stipend is paid every month.
e) Give the output of the following SQL statements:
i.
SELECT TRUNCATE(AvgMark,0) FROM STUDENT WHERE AvgMark<75;
ii.
SELECT ROUND(AvgMark) FROM STUDENT WHERE Grade=’B’;
iii.
SELECT CONCAT(Name, Stream) FROM STUDENT WHERE Class=’12A’;
iv. SELECT RIGHT(Stream,2) FROM STUDENT ;
f) Give the output of the following SQL statements:
i.
SELECT MIN(AvgMark) FROM STUDENT WHERE AvgMark<75;
ii.
SELECT SUM(Stipend) FROM STUDENT WHERE Grade=’B’;
iii.
SELECT AVG(Stipend) FROM STUDENT WHERE Class=’12A’;
iv. SELECT COUNT(DISTINCT Name) FROM STUDENT ;
Question No-3— consider the following tables. Write SQL commands for the statements (i) to (iv)
and give outputs for SQL queries (v) to (viii).
Table-SENDER
SenderID
SenderName
SenderAddress
SenderCity
ND01
R Jain
2,ABC Appts
New Delhi
MU02
H Sinha
12, Newtown
Mumbai
MU15
S Jha
27/A,Park Street
Mumbai
ND50
T Prasad
122-K,SDA
New Delhi
RecID
KO05
MU19
MU32
ND08
ND48
i.
ii.
iii.
iv.
v.
vi.
vii.
viii.
SenderID
ND01
ND01
MU15
MU02
ND50
Table-RECIPIENT
RecName
R Bajpayee
H Singh
P K Swamy
S Mahajan
S Tripathi
RecAddress
5, Central Avenue
2A, Andheri East
B5, C S Terminus
116, A Vihar
13, B1 D, Mayur
Vihar
RecCity
Kolkata
Mumbai
Mumbai
New Delhi
New Delhi
To display the names of all Senders from Mumbai.
To display the RecID, SenderName, SenderAddress, RecName, RecAddress for every Recipient.
To display Recipient details in ascending order of the RecName.
To display number of Recipients from each city.
SELECT DISTINCT SenderCity from SENDER;
SELECT A.SenderName,B.RecName
FROM SENDER A,Recipient B
WHERE A.SenderID=B.SenderID AND B.RecCity=’Mumbai’;
SELECT RecName,RecAddress FROM RECIPIENT WHERE RecCity NOT IN (‘Mumbai’,’Kolkata’);
SELECT RecID,RecName
FROM RECIPIENT
WHERE SenderID=’M02’ OR SenderID=’ND50’;
JAVA PRACTICAL FILE FOR THE SESSION 2015-16
Index for JAVA PROGRAMS
Name: _____________________________Section: ___
PN.
Roll No.: ____
Descriptions/Topics
REVISION OF CLASS XI
1
Create a Java Application for Mathematical Calculation using jLabel, jTextField and jButton controls.
2
Create a Java Application for Largest of three numbers using conditional operators.
3
Create a Java Application Even-Odd Application and Simple Interest calculator.
4
Create a Java Application Printing of month name and days based on switch-case.
5
Create a Java Application Grade Calculator based on if-else-if.
6
Create a Java Application for implementation of iteration statements (for, while, do-while).
7
Create a Java Application for implementation of Radio Button, Check Box, jList, Combo Box.
8
Create a Java Application to calculate the salary of individual teacher.
JAVA PROGRAMMING
9
Create a Java Application for implementation of Java Methods.
10
Create a Java Application for implementation of Java Classes and Objects and one also using
constructor.
11
Create a Java Application for implementation of Inheritance to find the Factorial of a given number.
12
Create a Java Application for implementation of Java Overriding method.
13
Create a Java Application for implementation using JMenu Control.
STRING LIBRARY
14
Create a Java Application Changing Case from lower to upper and upper to lower.
15
Create a Java Application Substring of a String, Concatenation, trim, length.
16
Create a Java Application Reverse of a String.
JDBC APPLICATION
17
JDBC Application-: Employee Data
 Add Record
 Delete Record
 Update Record
 Search Record
HTML & XML
18
Creating a 4 page website in HTML with images and text.
19
Creating a HTML Form.
20
Creating a STUDENT XML file with CSS.
Date
Sign
Download