You are on page 1of 2

GURUKUL ACADEMY, JHANKAT

P.A. III
Sub-Computer Science(083)
Class-XII(B)
TIME: 35 minutes M.M:50
General Instructions:
1. All the questions are compulsory.
2. The question paper consists of 16 questions and it is divided into four sections
A, B, C and D.
3. Section A comprises of 5 questions carrying 1 mark each.
4. Section B comprises of 5 questions carrying 1 marks each.
5. Section C comprises of 4 questions carrying 1.5 marks each.
6. Section D comprises of 2 questions carrying 2 marks each.

SECTION-A

1.To see all the databases which command is used?


a)Show database; b)Show databases; c)Show database(); d)Show_all
database;
2.In the following statement, what do you mean by the 'student'?
Query- USE student;
a)Database name b)Row name c)Column name d)Table name
3.Which of the following is the correct syntax to add a field using alter command?
a)ALTER TABLE table_name ADD field_name data type;
b)ALTER TABLE table_name, field_name data type;
c)ALTER TABLE field_name data type;
4.Which of the following function returns the current Date and Time in MySQL ?
a)CURDATE( ) b)NOW( ) c)CURTIME( ) d)DATE( )
5.Is a semicolon necessary after every query?
a)TRUE b)FALSE

SECTION-B
6. What do you mean by RDBMS?
7. Define Primary key in Database.
8. Define Candidate key in Database.
9.Write a SQL query syntax to update a record in database.
10.What is the use of ALTER command. Give an Example.

SECTION-C
11.Define NULL values in SQL tables with suitable example.
12.Define different data models.
13. Write advantages of DBMS.
14. Define following terms-
a)Domain b)Degree

SECTION-D

15.Write Python code to connect with mysql database where –


Host- localhost, username-gurukul, password-123456, database-school

16. See table -Employee

Ecode Ename Dept City Sex Salary


1001 Amit Marketing Ahmedabad M 49000
1002 Seema Production Delhi F 50000
1003 Kiran RND Surat F 32000
1004 Kishan Production Jaipur M 35000
1005 Nikhil Production Patna M 31000
1006 Priya Marketing Shimla F 40000
1007 Satish Marketing Mumbai M 38000
Write the following sql queries –
a)Find the average salary of all employee.
b)Write query to display records whose salary is greater than 40000.
c)Find the maximum salary in Employee.
d)Update the Dept RND to Production of Kiran.

You might also like