0% found this document useful (0 votes)
5 views6 pages

Computer Science Exam Paper 2025

Grade 12 Computer Science (083)

Uploaded by

joviraa89
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)
5 views6 pages

Computer Science Exam Paper 2025

Grade 12 Computer Science (083)

Uploaded by

joviraa89
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

Computer Science (083)

First Revision Examination Sep-2025


Class: XII Max. Marks: 70
Roll No: Times: 3hrs.

General Instructions:
 Please check this question paper contains 35 questions.
 The paper is divided into 4 Sections- A, B, C, D and E.
 Section A, consists of 18 questions (1 to 18). Each question carries 1 Mark.
 Section B, consists of 7 questions (19 to 25). Each question carries 2 Marks.
 Section C, consists of 5 questions (26 to 30). Each question carries 3 Marks.
 Section D, consists of 2 questions (31 to 32). Each question carries 4 Marks.
 Section E, consists of 3 questions (33 to 35). Each question carries 5 Marks.
 All programming questions are to be answered using Python Language only.
_______________________________________________________________________________________________
1. The primary key is selected from the set of ___________
a) Composite key b) alternate key c) candidate keys d) foreign keys
2. In SQL which command will be used to add a new record in a table?
a) UPDATE b) ADD c) INSERT d) ALTER TABLE
3. Mr. Ravi is creating a field that contains alphanumeric values and fixed
lengths. Which data type should be choosing for the same?
a) VARCHAR b) CHAR c) LONG d) NUMBER
3. ___________is a number of tuples in a relation.
a) Attribute b) Degree c) Domain d) Cardinality
4. Which SQL command can change the degree of an existing relation?
5. What will be the output of the query?
SELECT * FROM products WHERE product _name LIKE ‘App%’;
a) Details of all products whose names start with ‘App’
b) Details of all products whose names end with ‘App’
c) Names of all products whose names start with ‘App’
d) Names of all products whose names end with ‘App’
6. In which data type the value stored is padded with spaces to fit the specified
length.
a) DATE b) VARCHAR c) FLOAT d) CHAR
7. Which of the following statements is FALSE about keys in a relational
database?
a. Any candidate key is eligible to become a primary key.
b. A primary key uniquely identifies the tuples in a relation.
c. A candidate key that is not a primary key is a foreign key.
d. A foreign key is an attribute whose value is derived from the primary key of
another relation
8. An attribute in a relation is a foreign key if it is the __________ key in any other
relation.
a) Candidate b) Primary c) Alternate d) Foregin
9. The NULL value also means ___________
a) Value equal to zero b) unknown value c) negative values d) a large value
10. Select correct SQL query from below o find temperature in increasing order of
all cites.
a) SELECT city FROM weather ORDER BY temperature;
b) SELECT city, temperature FROM weather;
c) SELECT city, temperature FROM weather ORDER BY temperature;
d) SELECT city, temperature FROM weather ORDER BY city;
11. Write the output of the following SQL commands:
SELECT pow(2,2*2);
a) 16 b) 2 c) 4 d) 8
12. Which of the following SQL function returns the number of values in the
specified column ignoring the NULL values?
a) COUNT(*) b) COUNT(columnname) c) LENGHTH (*)
d)LENGTH(columnname)
13. _______ helps to fetch a group of rows based on common values in a column.
a) ORDER BY b) FILTER c) GROUP BY d) SELECT BY
14. Which SQL statement is used to remove specific rows from a table based on a
condition?
a) DROP b) TURNCATE c) DELETE d) REMOVE
15. While creating a table, which constraint does not allow insertion of duplication
value in the table?
a) UNIQUE b) DISTINT c) NOT NULL d) HAVING
16. Fill in the blank:
_________ is a table constraint that will prevent the entry of duplicate rows.
(a) Primary Key (b) NULL (c) Unique (d) Distinct
Q.17 and 18 are Assertions (A) and Reason (R) based questions. Mark the
correct choice as
a) Both A and R are true and R is the correct explanation for A
b) Both A and R are true and R is not the correct explanation for A
c) A is True but R is False
d) A is false but R is True
17. Assertion (A): We can retrieve records from more than one table in MYSQL.
Reason (R): Foreign key is used to establish a relationship between two tables.
18. Assertion (A): The HAVING Clause is used with aggregate functions.
Reason (R): WHERE clause places condition on individual rows
SECTION B
19. Differentiate between DROP and DELETE command of SQL.
20. Identify commands/functions for the following actions:
i) To add a new column to a table.
ii) To get the sum of all values in a column of a table.
21. Differentiate between % (percentage) and _(underscore) characters used with
the LIKE operator in SQL with appropriate examples.
22. Differentiate between Candidate Key and Primary Key in the context of
Relational Database.
23. Write the code to create a table Product in database Inventory with following
fields:
Fields Datatype
PID VARCHAR(5)
PName Char(30)
Price Float
Rank Varchar(2)
24. What are Tuples in a SQL Table? Write a suitable example with a SQL Table to
illustrate your answer.
25. Differentiate between Order By and Group by clause in SQL with appropriate
example.
SECTION C

26. Write the output of SQL queries (a) to (d) based on the table
VACCINATION_DATA given below :

(a) SELECT Name, Age FROM VACCINATION_DATA WHERE Dose2 IS NOT NULL
AND Age > 40;
(b) SELECT City, COUNT (*) FROM VACCINATION_DATA GROUP BY City;
(c) SELECT DISTINCT City FROM VACCINATION_DATA;
(d) SELECT MAX (Dosel), MIN (Dose2) FROM VACCINATION_DATA;
27. A) Consider the following tables – CARDEN and CUSTOMER:
Table: CARDEN Table: CUSTOMER

Code CarName Charges Code CarName


501 A-star 18 1001 Hemant Sahu
503 Indigo 16 1002 Raj Lal
502 Innova 15 1003 Feroza Shah
509 SX4 14 1004 Ketan Dhar

a) What will be the output of the following statement?


SELECT * FROM CARDEN, CUSTOMER;
(b) Write the output of the queries (i) to (iv) based on the table, STOCK given below:
Table:STOCK
Itemno Item Dcode Qty UnitPrice StockDate
5005 Ball Pen 0.5 102 100 16 2010-03-31
5003 Ball Pen 0.25 102 150 20 2010-01-01
5002 Gel Pen Premium 101 125 14 2010-02-14
5006 Gel Pen Classic 101 200 22 2009-01-01
5001 Eraser Small 102 210 5 2009-03-19
5004 Eraser Big 102 60 10 2009-12-12
5009 Sharpener 103 160 8 2009-01-23
Classic
Table: DEALERS
Dcode DName
101 Reliable Stationers
103 Classic Plastics
102 Clear Deals
(i) SELECT Dcode, MAX(UnitPrice) FROM STOCK GROUP BY Dcode;
(ii) SELECT COUNT(DISTINCT Dcode) FROM STOCK;
(iii) SELECT Qty*UnitPrice FROM STOCK WHERE ItemNo=5006;
(iv) SELECT MIN(StockDate) FROM STOCK;
28. A list contains the following record of a Hostel: [Hostel_No, Total_Students,
Total Rooms] (3)
Write the following user defined functions to perform given operations on the
stack named ‘Hostel’:
(i) Push_element() - To push an object containing Hostel_No and Total Students
along with Total Rooms to the stack
(ii) Pop_element() - To pop the objects from the stack and display them. Also,
display “Stack Empty” when there are no elements in the stack.
For example:
If the lists of Hostel details are:
[1,2000,1000]
[2, 1500,800]
[3,5000,2000]
The output should be:
[1,2000,1000]
[2, 1500,800]
[3,5000,2000]
Stack Empty
29. i) Write any two important features of Foreign key
ii) Write an SQL command to add a UNIQUE constraint to an existing column
named `email` in the `students` table.
iii) Write an SQL command to modify the data type of the column
“phone_number” to VARCHAR(15) in the employee table.
30. i) Write an SQL command to rename the column “address”; to “location” in the
employee table.
ii) Expand the following: a) LIFO b) RDBMS
iii) Satheesh has created a database “school” and table “student” and helps him
to write SQL queries for the following
a) To view all the databases.
b) To add the new column PhoneNo of datatype integer to the table student
SECTION D
31. Consider the tables PRODUCT and BRAND given below:
Table: PRODUCT
Pcode PName UPrice Rating BID
P01 Shampoo 120 6 M03
P02 Toothpaste 54 8 M02
P03 Soap 25 7 M03
P04 Toothpaste 65 4 M04
P05 Soap 38 5 M05
P06 Shampoo 245 6 M05
Table: Brand
BID BName
M02 Dant Kanti
M03 Medimix
M04 Pesodent
M05 Dove
Write SQL queries for the following:
i) Display product name and brand name from the tables PRODUCT and
BRAND.
ii) Display the structure of the table PRODUCT.
iii) Display the average rating of Medimix and Dove brands
iv) Display the name, price, and rating of products in descending order of
rating.
32. Write Addnew(Book) and Remove(Book) methods in Python to Add a new Book
and Remove a Book from a List of Books, considering them to act as PUSH and
POP operations of the data structure stack.
SECTION E
33. Consider the table, BOOK and MEMBER given below:

CODE BNAME TYPE


F101 Thepriest FICTION
L102 Easy Python PROGRAMMING
C101 Jumanj THRILLER
F102 Untold Story FICTION
C102 War stories COMIC
TABLE: Member:
MNO MNAME CODE ISSUEDATE

M101 Rayan L102 2022-10-13


M103 Mani F102 2021-02-23

M102 Kamala C101 2022-06-12

a) What will be the output of the following statement?


SELECT * FROM BOOK NATURAL JOIN MEMBER.
b) Write the output of the queries (i) to (iv) based on the following table:
Table Employee:
EID ENAME DOB DOJ SALARY PROJECT

E01 Rajan 1990-07-12 2015-01-21 150000 P01

E02 Ankith 1992-06-21 2015-02-01 125000 P04

E03 Maran 1996-11-15 2018-08-19 135000 P01

E04 Joshva 1991-10-25 2018-10-19 75000 P02

E05 Alex 1993-12-16 2018-10-19 85000 P04

i) SELECT NAME, PROJECT FROM EMPLOYEE ORDER BY NAME DESC;


ii) SELECT NAME, SALARY FROM EMPLOYEE WHERE NAME LIKE 'A%';
iii) SELECT NAME, DOJ FROM EMPLOYEE WHERE SALARY BETWEEN
100000 AND 200000;
iv) SELECT * FROM EMPLOYEE WHERE PROJECT = 'P01';
34. Consider the table PRODUCT and CLIENT given below:
PRODUCT
PR_ID PR_NAME MANUFACTURER PRICE QTY
BS101 BATH SOAP PEARSE 45.00 25
SP210 SHAMPOO SUN SILK 320.00 10
SP235 SHAMPOO DOVE 455.00 15
BS120 BATH SOAP SANTOOR 36.00 10
TB310 TOOTH BRUSH COLGATE 48.00 15
FW422 FACE WASH DETOL 66.00 10
BS145 BATH SOAP DOVE 38.00 20
Table: Client
C_ID C_NAME CITY PR_ID
01 DREAM COCHIN BS101
02 MART DELHI TB310
SHOPRIX
03 BIG BAZAR DELHI SP235
04 LIVE LIFE CHENNAI FW422
Write SQL Queries for the following:
i) Display the details of those clients whose city is DELHI
ii) Increase the Price of all Bath soap by 10
iii) Display the details of Products having the highest price
iv) a) Display the product name, price, client name and city with their
corresponding matching product Id.
b) Display the cardinality of the Cartesian join of product & client tables
35. i) Differentiate between the VARCHAR and CHAR data type.
ii) Write the statement to:
a) Insert the following record into the table of RESULT- RollNo-108, Name-
Aadit, Sem1- 470, Sem2-444, Sem3-475, Div-I.
b) Increase the SEN 2 marks of the students by 3% whose name begins with
N
iii) What is the following command doing?
ALTER TABLE Persons
ADD CONSTRAINT chk_Person CHECK(P_ID>0 AND city=’Shimla’);
iv) Write the syntax to create a table.

You might also like