12th CS PT Set1
12th CS PT Set1
PERIODIC TEST 1
Class: XII Subject: Computer Science (083) Marks -40
General Instructions:
(1) There are 20 questions in all. All questions are compulsory
(2) This question paper has five sections: Section A, Section B, Section C, and Section D. All the sections
are compulsory.
(3) Section A contains ten MCQ of 1 mark each, Section B contains three questions of two marks each,
Section C contains four questions of three marks each, Section D contains three long questions of four marks
each.
(4) There is no overall choice. However, an internal choice has been provided in section D. You have to
attempt only one of the choice.
SECTION A
1. Which command is used to add a new row? 1m
(a) insert (b) create (c) update (d) add
2. Command to remove the row(s) from table student is 1m
(a) drop table student: (b) drop from student:
(c) remove from student: (d) delete from student:
3. Which SQL command is used to add a new attribute in a table? 1m
4. Which clause is used with a SELECT command in SQL to display the records 1m
in ascending order of an attribute?
5. What is the full form of SQL? 1m
(a) Structured Query List (b) Structure Query Language
(c) Sample Query Language (d) None of these
6. Which of the following is not a DDL command? 1m
(a) TRUNCATE (b) ALTER (c) CREATE (d) UPDATE
7. Which of the following are TCL commands? 1m
(a) COMMIT and ROLLBACK (b) UPDATE and TRUNCATE
(c) SELECT and INSERT (d) GRANT and REVOKE
8. Which statement is used to delete all rows in a table without having the action 1m
logged?
(a) DELETE (b) REMOVE (c) DROP (d) TURNCATE
9. SQL Views are also known as 1m
(a) Simple tables (b) Virtual tables (c) Complex tables (d) Actual Tables
10. How many Primary keys can have in a table? 1m
(a) Only 1 (b) Only 2
(c) Depends on no of Columns (d) Depends on no DBA
SECTION B
11. Observe the following table EMPLOYEES and DEPARTMENT carefully and 2m
answer the questions that follows:
Table Employees Table Employees
ENO ENAME DOJ DNO EN DNAME
E1 ANSUR 2001-11-21 D3 O
E2 KABIR 2005-10-25 D1 D1 ACCOUNTS
D2 HR
D3 ADMIN
(i) What is the Degree of the table EMPLOYEES? What is the cardinality
of the table DEPARTMENT?
(ii) What is a Primary Key?
12. Define Primary Key 2m
13. Write the Difference between DDL and DML? 2m
SECTION C
14. Write outputs for SQL queries (i) to (ii), which are based on the following tables 3m
CUSTOMERS and PURCHASES
Table: Course
CID CNAME FEES STARTDATE TID
C201 AGDCA 12000 2018-07-02 101
C202 ADCA 15000 2018-07-15 103
C203 DCA 10000 2018-10-01 102
C204 DDTP 9000 2018-09-15 104
C205 DHN 20000 2018-08-01 101
C206 O LEVEL 18000 2018-07-25 105
(a) Display the trainer Name, City and Salary in descending order of their
hire date.
(b) To display the TNAME and CITY of Trainer of joined the institute in the
month of December 2001.
(c) To display TNAME, HIREDATE, CNAME, STARTDATE from tables
TRAINER and COURSE whose FEES is less than or equal to 10000
(d) To display number of trainer from each city\
(e) Select tid, tname, from trainer where city not in (‘delhi’,’mumbai’)
(f) Select distinct tid from course;
(g) Select tid, count(*), min(fees) from course group by tid having
count(*)>1;
(h) Select count(*), sum (fees) form course where startdate<’2018-09-15’;