KV HEBBAL SHADASHIVANAGAR
BENGALURU-80
School code: MOCK AISSCE Practical
Examination 17-18 Max Marks
-30
Date:
Computer Science (Sub code-083)
Time-3hrs
SET
-1
Breakup of marks: 1.C++ program 10marks 2.SQL 5mark 3.Project 5Marks
4.Practical Record 6marks 5.Viva 4marks
1. Write a C++ Program to
implement Stack using Linked Lists
2. Given
the following tables for a database LIBRARY : (SQL-1)
Book_Id
|
Book_Name
|
Author_Name
|
Publishers
|
Price
|
Type
|
Quantity
|
C0001
|
Fast
Cook
|
Lata
Kapoor
|
EPB
|
355
|
Cookery
|
5
|
F0001
|
The
Tears
|
William
Hopkins
|
First
Publ
|
650
|
Fiction
|
20
|
T0001
|
First
C++
|
Brain
Brooke
|
EPB
|
350
|
Text
|
10
|
T0002
|
C++
Brain
|
A.
W. Rossaine
|
TDH
|
350
|
Text
|
15
|
F0002
|
Thunder
|
Annaborts
|
First
Publ
|
750
|
Fiction
|
50
|
Table:ISSUED
Book_Id
|
Quantity_Issued
|
T0001
|
4
|
C0001
|
5
|
F0001
|
2
|
Write
SQL queries for (a) to (f) and write output (i) to (iv) queries
a) To show Book name, Author
name and Price of books of First Publishers.
b) To list the names from
books of Text type.
c) To display the names and
price of all books in ascending order of their price.
d) To increase the price of
all books of EPB Publishers by 50.
e) To display the Book_Id,
Book_Name and Quantity_Issued for all books which have been issued.
f) To insert a new row in the
table ISSUED having the following data : “F0003”,1
g) Give
the output of the following queries based on the above tables:
i. Select count(*) from Library;
ii. Select max(Price) from Library where Quantity>=15;
iii. Select Book_Name, Author_Name from Library where Publisher=”EPB”;
iv. Select count(distinct Publishers) from BOOKS where Price>=400;
KV HEBBAL
SHADASHIVANAGAR BENGALURU-80
School code: MOCK AISSCE Practical
Examination 17-18 Max Marks
-30
Date:
Computer Science (Sub code-083)
Time-3hrs
SET
-2
Breakup of marks: 1.C++ program 10marks 2.SQL 5mark 3.Project 5Marks
4.Practical Record 6marks 5.Viva 4marks
1.Write a C++ Program to implement Queue
using Linked List.
2. Given the following tables for a database
FURNITURE: (SQL-2)Table1: FURNITURE
No
|
Item_name
|
Type
|
Date of stock
|
Price
|
Discount
|
1
|
White lotus
|
Double bed
|
23-FEB-02
|
30000
|
25
|
2
|
Pink feather
|
Baby cot
|
20-JAN-02
|
7000
|
20
|
3
|
Dolphin
|
Baby cot
|
19-FEB-02
|
9500
|
20
|
4
|
Decent
|
Office table
|
01-FEB-02
|
25000
|
30
|
5
|
Comfort zone
|
Double bed
|
12-JAN-02
|
25000
|
25
|
6
|
Donald
|
Baby cot
|
24-FEB-02
|
6500
|
15
|
7
|
Royal finish
|
Office table
|
20-FEB-02
|
18000
|
30
|
8
|
Royal tiger
|
Sofa
|
22-FEB-02
|
31000
|
30
|
9
|
Econo sitting
|
Sofa
|
13-FEB-01
|
9500
|
25
|
10
|
Eating paradise
|
Dining table
|
19-FEB-02
|
11500
|
25
|
Table 2: Arrivals
No
|
Itemname
|
Type
|
Dateofstock
|
Price
|
Discount
|
11
|
Wood comfort
|
Double bed
|
23-MAR-03
|
25000
|
25
|
12
|
Old fox
|
Sofa
|
20-FEB-03
|
17000
|
20
|
13
|
Micky
|
Baby cot
|
21-FEB-03
|
7500
|
15
|
I Write SQL queries for Q1 to Q6:
Q1. To show all information about Baby cots from the
FORNITURE table.
Q2. To list the Itemname which are priced more
than 15000 from the FURNITURE table.
Q3. To list the Itemname and Type of
those items, in which Dateofstock is before 22/01/02 from the FURNITURE table in descending order of
Itemname.
Q4. To display the Itemname and
Dateofstock of those items, in which Discount percentage is more than 25 from
FURNITURE table.
Q5. To count the number of items, whose Type is
“Sofa” from FURNITURE table.
Q6. To insert
a new row in the ARRIVALS table with the following data :
14, “Velvet touch”, “Double bed”, {25/03/03}, 25000, 30
II Give
the output of the following SQL statements :
i. Select
count(distinct Type) from FURNITURE;
ii. Select
max(Discount) from FURNITURE;
iii. Select
avg(Discount) from FURNITURE where type=”BABY COT”;
iv. Select
sum(price) from FURNITURE where DOS< '12-FEB-02';
KV HEBBAL SHADASHIVANAGAR BENGALURU-80
School code: MOCK AISSCE Practical
Examination 17-18 Max Marks
-30
Date:
Computer Science (Sub code-083) Time-3hrs
SET
-3
Breakup of marks: 1.C++ program 10marks 2.SQL 5mark 3.Project 5Marks
4.Practical Record 6marks 5.Viva 4marks
1. Write a C++ Program to display the details of a
class Travel using classes and objects.
2. Given the following tables for a database
SHOPEE AND Accessories (SQL-3)
Write SQL
queries for Q1 to Q5:
Table:
SHOPEE
Id
|
SName
|
Area
|
S001
|
ABC Computronics
|
CP
|
S002
|
All Infotech Media
|
GK II
|
S003
|
Tech Shoppe
|
CP
|
S004
|
Greeks Tecno Soft
|
Nehru Place
|
S005
|
Hitech Tech Store
|
Nehru Place
|
Table: Accessories
No
|
Name
|
Price
|
Id
|
A01
|
Mother Board
|
12000
|
S001
|
A02
|
Hard Disk
|
5000
|
S001
|
A03
|
Keyboard
|
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
|
Q.1 To display Name
and Price FROM Accessories in ascending order of their Price.
Q.2 To display Id,
SName of all shopee located in Nehru Place
Q.3. To display Minimum
and Maximum Price of each Name of Accessories.
Q.4 To display Name, Price
of all Accessories and their respective SName where they are available.
Q5. To display price and
name from table Accessories where price > 5000
KV
HEBBAL SHADASHIVANAGAR BENGALURU-80
School code: MOCK AISSCE Practical
Examination 17-18 Max Marks
-30
Date:
Computer Science (Sub code-083) Time- 3hrs SET
-4
Breakup of marks: 1.C++ program 10marks 2.SQL 5mark 3.Project 5Marks
4.Practical Record 6marks 5.Viva 4marks
1. Write a
C++ Program to display the details of
the class Hotel using classes and Objects.
2. Consider the
following Dept and Employee tables.(SQL-4) Write SQL queries for (1) to
(5) and find outputs for SQL queries (6) to (8).
Table: Dept
DCODE
|
DEPARTMENT
|
LOCATION
|
D01
|
INFRASTRUCTURE
|
DELHI
|
DO2
|
MARKETTING
|
DELHI
|
D03
|
MEDIA
|
MUMBAI
|
D05
|
FINANCE
|
KOLKATA
|
D04
|
HUMAN RESOURCE
|
MUMBAI
|
Table: Employee
ENO
|
NAME
|
DOJ
|
DOB
|
GENDER
|
DCODE
|
1001
|
GEORORGE K
|
01-SEPT-2013
|
01-SEPT-1991
|
MALE
|
D01
|
1002
|
RYMA SEN
|
11-DEC-2012
|
15-DEC-1990
|
FEMALE
|
D03
|
1003
|
MOHITESH
|
03-FEB-2013
|
04-SEPT1987
|
MALE
|
D05
|
1007
|
ANILA JHA
|
17-JAN-2014
|
19-OCT-1984
|
MALE
|
D04
|
1004
|
MANILA SAHAI
|
09-DEC-2012
|
14-NOV-1986
|
FEMALE
|
D01
|
1005
|
R SAHAY
|
18-NOV-2013
|
31-MAR-1987
|
MALE
|
D02
|
1006
|
JAYA PRIYA
|
09-JUNE-2014
|
23-JUNE-1985
|
FEMALE
|
D05
|
Q01 - To display Eno,
Name, Gender from the table EMPLOYEE in ascending of Eno.
Q02 - To display the Name
of all the MALE emloyees from the table EMPLOYEE.
Q03 - To display the Eno
and Name of those employees from the table EMPLOYEE who are born
between '01-JAN-87' and '01-DEC-91'.
Q04 - To count and
display FEMALE employees who have joined after '01-JAN-86'.
Q05 – To display details
of all male employee from table Employee
Q6. SELECT COUNT(*), DCODE
FROM EMPLOYEE GROUP BY DCODE HAVING COUNT(*)>1;
Q07 - SELECT DISTINCT
DEPARTMENT FROM DEPT;
Q08 - SELECT NAME,
DEPARTMENT FROM EMPLOYEE E , DEPT D WHERE E.DCODE=D AND ENO<1003;
Q09 - SELECT MAX(DOJ),
MIN(DOB) FROM EMPLOYEE;