Model Exam - Database Systems
Model Exam - Database Systems
5. If you want to drop a table called “Employee” and flush it out from the recyclebin also,
what could be the appropriate SQL statement to do so?
6. The major difference between simple view and complex view is?
A. Simple view can be created on multiple tables using joins
B. Simple view is created on top of one table only
C. Complex View is just selection of columns from the table without any transformation
D. Simple view does not allow DML operation on it.
7. Identify the wrong statement about indexes?
A. Indexes cannot be modified but can be altered for analysis, rebuilding or stats
computation purposes.
B. Indexes are automatically dropped once the table has been dropped.
C. Indexes can be created automatically or manually
D. Manually created indexes are always unique
8. Null value (a column that doesn't has a definite value) denotes:
9. Suppose that your manager is working on the quarterly budget for your organization.
As part of this activity, it is necessary to produce a listing of each employee's essential
details, but only for employees that are paid at least $25,000 annually. Identify the
appropriate SQL query to accomplish this task?
A. SELECT Employee_ID, Last_Name, First_Name, Salary FROM employees WHERE
Salary greater than or equal to 25000;
B. SELECT Employee_ID and Last_Name and First_Name and Salary FROM
employees WHERE Salary greater than or equal to 25000;
C. SELECT Employee_ID, Last_Name, First_Name, Salary FROM employees WHERE
Salary >= 25000;
D. SELECT Employee_ID & Last_Name & First_Name & Salary FROM employees
WHERE Salary >= 25000;
10. Consider the following SQL code:
A. Department_i
d
SE_5 3500
B. ERROR at line 1: not a single-group group function
0
C. Department_i
d
Department_i
D.
d
SE_5 Null
11. _______ creates a join between tables by displaying every possible record combination?
12. Which DDL command is used to flush out all records from a table but retaining the
table structure?
A. Drop C. Truncate
B. Alter D. Purge
A. Rollback C. SavePoint
B. Commit D. Abort
14. Consider the EMPLOYEES table which gets populated with newly hired employee
details during first quarter of every year. The clerical staff appends each employee
detail with a savepoint, so as to rollback any faulty data at any moment during the data
feeding activity. Note that he keeps the savepoint names same as the employee names.
INSERT INTO employees (employee_id, first_name, hire_date, job_id, salary, department_id) VALUES (105,
'Samuel',TO_DATE ('15-JAN-2013','SALES',10000,10);
SAVEPOINT Samuel;
INSERT INTO employees VALUES (106, 'Yohannes',TO_DATE ('15-JAN-2013','PROD',10000,20);
SAVEPOINT Yohannes;
Suppose, the data feeding operator realizes that he has wrongly entered the salary of
'Yohannes'. What should be the appropriate SQL statement in order to roll back the active
transaction and re-enter the employee details for Yohannes.
17. Which phase of database normalization considers the concept of join dependence?
A. 2NF C. 5NF
B. 4NF D. Boyce-Codd NF
A. Isolation C. Atomicity
B. Durability D. Consistency Preservation