2024 XI Periodic Test 2
2024 XI Periodic Test 2
General Instructions:
1. This question paper contains five sections, Section A to E.
2. All questions are compulsory.
3. Section A has 5 questions carrying 01 mark each.
4. Section B has 3 questions carrying 02 marks each.
5. Section C has 2 questions carrying 03 marks each.
6. Section D has 2 questions carrying 04 marks each.
7. Section E has 1 question carrying 05 marks.
________________________________________________________________________________________________________
SECTION A
1. Consider the table with structure below,which attribute will form the 1
Primary key?
Project(P_ID, P_name, P_deptname,P_status)
The degree of student table from the above code snippet is:
(a) 30 (b) 1 (c) 3 (d) 4
4. The datatypes CHAR(n) and VARCHAR(n) are used to create _______ and 1
_________ types of string/text fields in a database.
(a) Fixed,equal (b) Equal, variable
(c) Fixed, variable (d) Variable, equal
5. SELECT NAME FROM CLASS WHERE SUBJECT ________ NULL; 1
Which comparison operator(s) may be used to fill the blank space in the
above query?
(a) = (b) LIKE (c) IS (d) IS NOT
SECTION B
7. Suppose that all the customers of a particular business live in states for 2
which the city name is unique. Given the following description for customer
data:
CUST-ID, CUST-NAME, STREET, CITY, STATE, PHONE)
1
(a) List the most likely attribute for the primary key.
SECTION C
SECTION D
12. (a) Write SQL command to create table ABC with following details: 2
(b) Write the command to now add the primary key on the column Rollno. 1
SECTION E
13. Write SQL commands for the following on the basis of given table SPORTS: 5
StNo Class Name Game1 Grade1 Game2 Grade2
10 7 Sameer Cricket B Swimming A
2
11 8 Sujit Tennis A Skating C
12 7 Kamal Swimming B Football B
13 7 Veena Tennis C Tennis A
14 9 Archana Basketball A Cricket A
(a) Display the names of the students who have grade 'A' in either Game1
or Game2 or both.
(b) Display the names of students who have the same game for both
Game1 and Game2.
(c) Display the games taken by the students whose name starts with 'A'.
(d) Give the output of the following sql statements:
(i) select count(*) from SPORTS;
(ii) select distinct Class from SPORTS;