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

Grade XII Informatics Practices PA1

Uploaded by

otherdummy01
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)
19 views6 pages

Grade XII Informatics Practices PA1

Uploaded by

otherdummy01
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/ 6

065

No. of Printed Pages: 6 QP CODE:

PERIODIC ASSESSMENT 1 – 2024 - 2025

Class : XII Max. Marks : 35


Subject : Informatics Practices Duration : 1.5 Hrs
Date : /06/2024

General Instructions:
1. This question paper contains four sections 16 questions, Section A to D.
2. All questions are compulsory.
3. Section A have 6 questions carrying 01 mark each.
4. Section B has 05 Very Short Answer type questions carrying 02 marks each.
5. Section C has 03 Short Answer type questions carrying 03 marks each.
6. Section D has 02 Long Answer type questions carrying 05 marks each.
7. All programming questions are to be answered using MySQL only.

Section –A 6
Each question carries 1 marks Marks
Q Question
NO

1 You have a table called "sales" that contains sales data for a retail store. Which 1
SQL aggregate function can be used to calculate the total number of rows or
records in the "sales" table?
a) MAX()
b) MIN()
c) AVG()
d) COUNT()

2 If column ‘Marks’ contains the data set {25,35,25,35,38,40}, what will be the 1
output after the execution of the given query?
SELECT DISTINCT(MARKS) FROM STUDENTS;
a) 25,35,25,35,38,40
b) 25,35,38,40
c) 25,25,35,35,38,40
d) None

Page 1 of 6
3 Which of the following SQL queries is used to retrieve rows from the "customers" 1
table where the "email" column contains NULL values?
a) SELECT * FROM customers WHERE email = NULL;
b) SELECT * FROM customers WHERE email IS NOT NULL;
c) SELECT * FROM customers WHERE ISNULL(email);
d) SELECT * FROM customers WHERE email IS NULL;

4 With SQL, how do you select all the records from a table named ‘Students’ where
the value of the column ‘Firstname’ ends with an ‘a’?
a) SELECT * FROM Students WHERE Firstname=’a’;
b) SELECT * FROM Students WHERE Firstname like’a%’; 1
c) SELECT * FROM Students WHERE Firstname like’%a’;
d) SELECT * FROM Students WHERE Firstname=’%a%’;

5 In SQL, which function is used to extract a date from a date expression? 1


a) Now( )
b) Curdate( )
c) Date( )
d) Day( )

6 Q6 is ASSERTION AND REASONING based questions. Mark the correct choice 1


as

i. Both A and R are true and R is the correct explanation for A


ii. Both A and R are true and R is not the correct explanation for A
iii. A is True but R is False
iv. A is false but R is True

Assertion (A): A join is a query that combines rows from two or more tables.

Reason(R): Equi- joins are joins based on equality conditions.

Section –B 10
Each question carries 2 marks Marks
7 Raj is a database programmer, he has to write the query from Employee table to 2
search for the employee whose name begins from letter ‘R’, for this he has write
the query as :
select * from Employee where Name=’R%’;
But the query is not producing the correct output, help Raj and correct the query so
that he gets the desired output.

Page 2 of 6
8 Observe the given table Teacher and give the output of the question (i) and (ii).
2

9 Name two aggregate (group) function of SQL and explain with example. 2

10 Write the output of SQL queries (a) to (d) based on the given table. 2

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(Dose2), Min(Dose2) from vaccination_data;

11 Consider the following two commands with reference to a table, named Employee 2
having a column named Department:
(a) Select count(Department) from Employee;
(b) Select count(*) from Employee;
If these two commands are producing different results,
(i) What may be the possible reason?
(ii) Which command (a) or (b) might be giving a higher value?
Section –C 9
Each question carries 3 marks Marks
12 How foreign key command is different from Primary Key command? How is 3
Foreign Key commands related to Primary Key?

13 ABC Gym has created a table TRAINER. Observe the table given below and 3
answer the following questions accordingly. (Answer any three)

Page 3 of 6
a. What is Degree and Cardinality of the above table?
b. Which field should be made as the primary key? Justify your answer.
c. Write the query to create the table Trainer.
d. Write the query to increase the salary 10% who is from city ‘Mumbai’

14 Mr. Manav, a database administrator in “Global Educational and Training


Institute” has created following table named “Training” for the upcoming training 3
schedule:
Training Name Emial_Id Topic City Fee
_Id

ND01 Mr. [email protected] Cyber New Delhi 10000


Rajan om Security

GU01 Ms. urv@yahoo. ICT in Gurugram 15000


Urvashi com Education

FD01 Ms. Neenarediff. Cyber Faridabad 12000


Neena com Security

ND02 Mr. NULL ICT in New Delhi 13000


Vinay Education

GU02 Mr. nav@gmail. Cyber Gurugram NULL


Naveen com Security

Help him in writing SQL query for the following purpose:


a) To count how many female candidates will be attending the training.
b) To display list of free training.
c) To display all the cities where Cyber Security training is scheduled
along with its fee.
d) To add a column feedback with suitable data

Page 4 of 6
Section –D 10
Each question carries 5 marks Marks
15

Page 5 of 6
16 Consider the following table and answer the questions that follow:
Table : TEACHER
5

a) To display all information about teachers of PGT category.


b) To list names, departments and date of hiring of all the teachers in
ascending order of date of joining
c) To count the number of teachers in English department
d) SELECT MAX(Hiredate) FROM Teacher;
e) SELECT DISTINCT(category) FROM teacher;
f) SELECT COUNT(*) FROM TEACHER WHERE Category =
"PGT"
g) SELECT AVG(Salary) FROM TEACHER group by Gender;

Page 6 of 6

You might also like