KEMBAR78
Informatics Practice FINAL | PDF | Table (Database) | Databases
0% found this document useful (0 votes)
14 views5 pages

Informatics Practice FINAL

Uploaded by

RAHUL BARUAH
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)
14 views5 pages

Informatics Practice FINAL

Uploaded by

RAHUL BARUAH
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/ 5

ST.

XAVIER’S SENIOR SECONDARY SCHOOL, DELHI – 110 054


Std. 11 Time : 3 hrs.
16-2-2023 Final Examination in INFORMATICS PRACTICE Max. Marks : 70
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 18 questions carrying 01 mark each.
4. Section B has 07 Very Short Answer type questions carrying 02 marks each.
5. Section C has 05 Short Answer type questions carrying 03 marks each.
6. Section D has 03 Long Answer type questions carrying 05 marks each.
7. Section E has 02 questions carrying 04 marks each.
8. All programming questions are to be answered using Python Language only.
SECTION – A
1. DBMS stands for ____________________________________.

2. The rows of the relation are generally referred as


i) Degree ii) Tuple
iii) Attributes iv) Cardinality

3. Which command shows the list of database in MySQL?


i) desc database ii) show tables
iii) show databases iv) describe databases

4. Which of the following keywords is used to display non repeated values in MySQL?
i) Unique ii) All
iii) Order by iv) Distinct

5. Consider the table ‘empsal’.


ID Salary Dept
Q101 54000 10
Q103 67000 20
Q105 75000 20
Q109 NULL 30
What is the degree and cardinality of above table?
i) 3, 4 ii) 4, 3
iii) 3, 5 iv) 5, 3

6. Find the errors in the following query and rewrite it.


delete * from student;

7. _____________method adds a single element to the existing list at the end.

8. Consider the following lists:


A=[1, 2]
B=[1, 2]
What will be the output of the following?
print(A==B)
i) True ii) False
iii) Error iv) No output

9. The list L1 contains [3, 4, 5, 6, 6, 8, 0]


What will be the output of the following expression?
print(L1[ -1])
i) 0 ii) 3
iii) 5 iv) 8
10. Which function is used to remove all elements from a particular dictionary?
i) clear( ) ii) pop( )
iii) delete( ) iv) remove( )

11. Write a code to create an empty dictionary.

12. Which SQL operator is used to display the data present in a certain range?
i) LIKE ii) BETWEEN
ii) IN iv) RANGE
Page 2 Std. 11 - Informatics Practice

13. Ranjana wants to delete the records from table salesman where name starts with A. Identify the
correct command.
i) Delete salesman where name like “A!”;
ii) Delete from salesman where name like “A%”;
iii) Delete salesman where name =”A%”;
iv) Delete from salesman where name =’A%’;

14. The avg( ) function in MySQL is an example of


i) Math function ii) Text function
iii) Date function iv) Aggregate function

15. Elements of a list are enclosed in _______brackets.


i) square ii) curly
iii) round iv) no

16. Which of the following statements is correct about list.


i) Lists can contain values of mixed data type
ii) Lists can contain duplicate values
iii) A list with no element is called empty list
iv) All of these

Question 17 and 18 are Assertion and Reasoning based Questions

17. Consider the following statements with respect to MySQL.


Statement A: char data type in MySQL store fixed length string.
Statement B: char data type stores string smaller than maximum field size.
i) Statement A is correct
ii) Statement B is correct
iii) Statement A and B both are correct
iv) Statement A is correct but statement B is incorrect

18. Consider the following statements with respect to dictionary


Statement A: Dictionary is mutable
Statement B: We can add new item or change the values of existing items.
i) Statement A is correct
ii) Statement B is correct
iii) Statement A is correct but statement B is incorrect
iv) Statement A and B both are correct.

Section – B

19. Write any two points of difference between DDL and DML commands
OR
Mention any four features of SQL.

20. What is a NULL value? Which operators are used with NULL values.
21. Write SQL commands to perform the following tasks:
i) create a database HOSPITAL
ii) open the database HOSPITAL

22. Write any two points of difference between LISTS and DICTIONARY
OR
Write any two points of difference between pop( ) method and del statement in LISTS.

23. Write the output of the given program segment


a=[2, 7, 9, 13, 28]
print(a[2:])
print(a[:2])

24. Write the output of the given program segment:


d1={1:10, 2:20, 3:30, 4:40, 5:50}
print(d1.items( ))
print(d1.keys( ))
Page 3 Std. 11 - Informatics Practice

25. Shreya has created a table with 10 rows and 5 columns. Later she performed the following
operations on the table.
i) Added one row and deleted one column.
ii) Deleted two rows and added three columns.
_________________will be the cardinality and ____________ will be the degree of the table
after performing operations (i) and (ii).

Section – C
26. Consider the following table:
Table: Salesman
Scode Sname Area Qtysold Dateofjoin
S001 Ravi North 120 2015-10-01
S002 Sandeep South 105 2012-08-01
S003 Sunil NULL 68 2018-02-01
S004 Ankit West 280 2010-04-01
S005 Shubh East 90 2018-10-01
S006 Raman North NULL 2018-10-01
Predict the output of the following SQL queries:
i) select max(Qtysold), min(Qtysold) from salesman;
ii) select count(Area) from salesman;
iii) select Dateofjoin from salesman order by Dateofjoin desc;

27. Write a python program to create a dictionary with the following key value pairs.
key value
1 10
2 20
3 30
4 40
Display all the elements of dictionary in different lines.

28. Write a python program to create a list storing first 5 odd numbers. Display maximum value
minimum value and sum of all odd numbers in a list.

29. Write the appropriate list method to perform the following tasks:
i) Get the position of element in the list.
ii) delete a given element from the list
iii) Add elements in the list at the end of a list
OR
i) Add an element at the beginning of the list.
ii) returns the length of the list.
iii) counts how many times an elements has occurred in a list.

30. Consider the table: ITEM


SNO Itemname Type Price Stockdate
1 Chairs Living 11500 2020-02-19
2 Account chairs Living 31000 2021-02-19
3 Baker Racks Kitchen 25000 2019-01-15
4 Sofa Living 7000 2020-10-18
5 Night Stand Bedroom NULL 2021-07-23
Write SQL queries for the following:
i) Display all the records of the table.
ii) Display itemname along with Price for last 3 records.
iii) Change the price from 7000 to 70000.
OR
i) Display SNO and price of the table
ii) Display itemname ending with s.
iii) Remove the records where price lies between 7000 and 25000 (Both are inclusive).
Page 4 Std. 11 - Informatics Practice
Section – D
31. Write the output of the given python code.
L1=[500, 600]
L2= [35, 45]
L1. append(700)
L1. extend(L2)
L1.insert(5, 2)
print(L1)
print(L1+L2)
print(L2)
print(L1.index(35))
print(L2*2)
OR
Write the output of the following python code:
L=[2, 4, 5, 6, 20, 30, 41, 45, 7]
print(L.count(4))
L.remove(7)
print(L)
L.reverse( )
print(L)
print(L.pop( ))
del L[1]
print(L)
32. A departmental store Mystore is considering to maintain their inventory using SQL to store the data
As a database administrator, Abhay has decided that
Name of the database-mystore
name of the table-store
the attributes of the store are as follows:
Itemno:integer
Itemname:varchar of size 20
Scode: integer
Quantity: integer
Table:Store
Itemno Itemname Scode Quantity
2005 Sharpner 23 60
2003 Ball Pen 0.25 22 50
2002 Pen Premium 21 150
2006 Pen Classic 21 250
2001 Eraser Small 22 220
2004 Eraser Big 22 110
2009 Ball pen 0.5 21 180
i) Identify the attribute best suitable to be declared as primary key
ii) Write the degree and cardinality of the table store
iii) Write command to remove the table store from the database mystore
iv) Insert the following data into the attributes Itemno, Itemname and scode respectively in the
given table Store.
itemno=2010, ItemName=” NoteBook” and Scode=25
v) Write the query to display the structure of the table store
i.e. name of the attributes and their respective datatypes used in the table.
33. Consider the following table student.
StudentNo Class Name Game Grade
10 7 Sameer Cricket B
11 8 Sujit Tennis A
12 7 Kamal Swimming B
13 7 Veena Tennis C
14 9 Archana Basket Ball A
15 10 Arpit Cricket A
Write SQL commands for the following statements:
i) Display the number of students getting Grade A.
ii) Display the different games offered in the school.
iii) Add a New column Marks with data type float (10, 2)
iv) Assign a value 200 for Marks for all those who are getting grade B.
v) Display the Game taken up by the students whose name starts with ‘A’.
Page 5 Std. 11 - Informatics Practice

Section - E
34. Write command to create a table CVOTER with following structure and insert one row into it.
Fieldname Datatype Size
Vno Integer 4
Vname Varchar 30
Age Integer 3
Address Varchar 30
Phone Integer 16

35. Consider the following table- Newstudent


Table-Newstudent
Admno Name Stream Optional Average
1001 Shrishti Account CS 90
1002 Ashi Humanities NULL 80
1003 Aditya Commerce IP NULL
1004 Rituraj Science NULL 65
1005 Sonali Commerce Maths 60
1006 Saumya Science IP 65
1007 Ashutosh Science IP NULL
1008 Prashant Science PE 65
1009 Aman Commerce IP 95
1010 Rishabh Commerce ENT 70
Write commands in SQL for (i) to (ii) and outputs for (iii) to (iv)
i) Change the average to 70 for Average having null value.
ii) To display details of all students other than Aditya and Prashant
iii) Select Name, Stream from Newstudent where stream not like ‘%e’;
iv) Select name from Newstudent where optional in (‘Maths’, ‘ENT’)



You might also like