Practice Paper
TERM II (2021 – 2022)
Class – XI
Informatics Practices (065)
Time: 2 hours Maximum Marks: 35
General Instructions:
(i) The question paper is divided into 3 sections – A, B and C
(ii) Section A, consists of 7 questions (1 – 7). Each question carries 2 marks
(iii) Section B, consists of 3 questions (8 – 10). Each question carries 3 marks
(iv) Section C, consists of 3 questions (11 – 13). Each question carries 4 marks
(v) Internal choices have been given for question numbers – 1, 8 and 13.
SECTION – A
1. Karan is confused with the terms Cardinality and Degree. Help him to understand the terms with a suitable example of each.
Cardinality is defined as the number of rows in a table
Degree is the number of columns in a table
Eg: Consider the following table
Table: Account
Cardinality of Account table is : 3
Degree of Account table is : 2
OR
Kritika is creating a table with following field names in Emp table:
EmpId, Ename, Date of birth, Date of joining, Designation, Address, PhoneNo, Driving License No.
She is not able to differentiate between Primary Key and Unique Key. Help her to understand the difference between them and keeping in view to the above fields decide which field name can kept as Primary Key and Unique Key.
The primary key is the minimum set of traits that distinguishes any row of a table. It cannot have NULL and duplicate values.
A unique key is an individual value that is used to protect duplicate values in a column. The foremost purpose of a unique key in a table is to prevent duplicate values.
Primary Key – EmpID
Unique Key – PhoneNo, Driving License No (Any one)
2. (i) _________ technology is able to take an existing environment and adds a layer of virtual information on top of it.
a) Immersive b) Augmented c) Non Immersive d) Virtual Reality
(ii) Which one of these is not an area of Artificial Intelligence (AI)?
a) Image recognition b) Voice Recognition c) Web designing d) Robotics
3. Pooja a student of class XI created a table “BOOK”. Price is a column of this table to find the details of books whose price have not been entered, she wrote the following”
Select * from Book where Price = NULL;
Select * from Book where Price ISNULL;
OR
Sujata has created a table Emp in MySQL. Later on she found that the width of name column is not sufficient for entering some long names. She wants to increase the width of the name column by 40. What command she should write to do this?
Alter table Emp name varchar(40);
4. What is Referential integrity in respect to RDBMS?
5. Differentiate between DDL and DML command with one example of each command?
6. Write a query to update the table BOOK by increasing the price of all books by 2%
Update Book
Set Price = price + price*0.02;
7. Differentiate between CHAR and VARCHAR data types in SQL.
SECTION – B
8. Write the output for the SQL queries (i) to (iii) on the basis of the ITEM relation given below:
i) SELECT * FROM ITEM
WHERE ITEMNO IN (101,103,105);
ii) SELECT itemno, iname, Price FROM ITEM
WHERE PRICE BETWEEN 50 AND 100;
iii) SELECT * FROM ITEM
ORDER BY INAME;
OR
i) Display the item information whose name has letter ‘o’
SELECT * FROM Item WHERE iname LIKE %o%;
ii) Increase the price of Soap and Soap box by 2%
Update item
SET price = price+price*0.02
WHERE iname = ‘Soap’ and iname = “Soap box”;
iii) Write SQL query to insert one record 106, Sanitizer, 60, 250
INSERT INTO item
VALUES(106, ‘Sanitizer’, 60, 250)
9 (i) “XYZ” Company has organized their Annual Conference. Participants are coming from different parts of the country to attend. Write SQL query to create a table “Participant” with the following structure:
(ii) Write the command to display the tables created in a database and write command to view the structure of the table.
SHOW TABLES;
DESC PARTICIPANT;
OR
DESCRIBE PARTICIPANT;
10. (a) Give full form of IoT and WoT
IoT – Internet of things
WoT – Web of things
(b) Explain NLP by giving any two examples
SECTION – C
11. Differentiate between with example –
(a) Delete and Drop command
(b) Alter and Update command
12. Study the following table DOCTOR and answer the following questions: –
i) Give the cardinality and degree of the table Doctor
Cardinality – 7
Degree – 5
ii) Write SQL Query to display the details of all those Doctors whose name either starts with ‘J’ or starts with ‘S’.
SELECT *
FROM Doctor
WHERE name LIKE ‘J%’ or name LIKE ‘S%’;
iii) Write SQL Query to display the details of all female doctors having experience more than 5 years.
SELECT *
FROM Doctor
WHERE sex=’F’ and experience >5;
iv) Write SQL Query to add column contact no, with data type as int and size as 10.
ALTER TABLE Doctor
ADD contactno int(10);
iv) Write SQL Query to add column contant no, with data type as int and size as 10.
OR
i) Write the SQL Query to display the records of ENT department
SELECT *
FROM Doctor
WHERE dept=’ENT’;
ii) Write the SQL Query to update the experience of all doctors by 1
UPDATE Doctor
SET experience=experience + 1;
iii) Write the SQL Query to Display Name, Dept in ascending order by and then by experience in descending order.
SELECT Name, Dept, Experience
FROM Doctor
ORDER BY dept Asc, Experience Desc;
iv) Write the SQL Query to ADD Primary Key to column ID in the existing table.
ALTER TABLE Doctor
ADD ID int PRIMARY KEY;
13. Consider the “Sales” table:
a) Write a SQL query to display the name of the oldest employee first then 2nd oldest and so on
SELECT Ename
FROM Sales
ORDER BY dojoin;
b) Which of the following command(s) will display all sales whose date of joining is after 31st March 2018
i) Select * from Sales where dateofjoin>=”31-03-2018”;
ii) Select * from Sales where dojoin>=”2018-03-31”;
iii) Select * from Sales where dojoin>”2018-03-31”;
iv) Select * from Sales where dojoin>”2018/03/31”;
c) Select Area, Ename as Employee, Amount*0.01 as PF from Sales where Area=”East” OR Area=”West”;
d) Write a SQL query to delete the record of Ecode as 102.
DELETE *
FROM Sales
WHERE Ecode = 102;