IP_WORKSHEET
IP_WORKSHEET
PART A
1. i) Which command is used to Open a Database? 1
ii) Which command is used to remove the Database?
2. Which is the DDL and which is the DML Command? 1
ALTER TABLE , INSERT INTO
3. What is the command to create a database? 1
4. The symbol Asterisk (*) in a select query retrieves ____________. 1
(i) All data from the table (ii) Data of primary key only
(iii) NULL data (iv) None of the mentioned
5. ____declares that an index in one table is related to that in another table. 1
(i) Primary Key (ii) Foreign Key (iii) Composite Key (iv) Secondary Key
6. Write a SQL query to display the Name of all those employee whose ENAME Field 1
contains 4 th character as ‘S’ from the table EMPLOYEE.
7. Write a SQL query to display records in ascending order of their Salary from the 1
table EMPLOYEE. Field Name SALARY.
8. What is the difference between DELETE and DROP command in 1
SQL. Explain with example.
9. List any 2 limitations of file system that can be overcome by a relational DBMS? 1
10. Define the following terms in the context of Database 1
(i) Relation
(ii) Tuple
11. Which of the following is not RBDMS software? 1
a) Oracle b) MS Excel c) MySQL d) MS Access
12. The design of data is known as 1
a) Database Schema b) Data Constraint c) Data Dictionary d) Database Instance
13. The SQL statements ends with 1
a) , b) : c) ; d) “
14. Shiv wants to see the table structure in MySQL. Select an appropriate command to 1
help him.
a) use b) show c) desc d) display
15. Sahil wants to delete a primary key constraint from the table. Select an appropriate 1
command which help him.
a) Create b) Alter c) Drop d) Delete
16. Rajveer wants to rename column in display result for his query. He has given he 1
following queries, select correct query for him:
a) select ename, salary*12 Annual Salary from emp;
b) select ename, salary*12 rename “Annual Salary” from emp;
c) select ename, salary * 12 change “Annual Salary” from emp;
d) select ename, salary*12 as “Annual Salary” from emp;
PART B
19. Write any four applications of DBMS. 2
20. Define the following: 2
i. Domain
ii. Degree
21. Mr. Malhotra is working on a MySQL table named ‘Stud’ with following table 2
schema:
23. What do you mean by constraints? Enlist the constraints supported by MySQL. 2
24. What is the difference between ALTER and UPDATE command in SQL. Explain 2
with example.
25. Consider the following tables STATIONERY and write SQL query for the given 2
questions:-
SECTION - D
31. Consider the table MARKS and write SQL query for the question i to ii and
find output for the given SQL query from iii to v.
33. Choose appropriate answer with respect to the following code snippet.
SECTION – E
4
i. How many attributes are there in the above table?
ii. How many tuples are there in the above table?
iii. What is the degree of the above table?
iv. What is the cardinality of the above table?