<< Home >>Datbase Multiple Choice Questions>>Page 1:



Database Technologies Multiple Choice Questions

Page 1 2 3 4 5 6 7 >>>
Page 1 2 3 4 5 6 7 >>>
1. Fetching past the last row of a cursor
    A. Raises the NO_DATA_FOUND Exception B. Raises the VALUE_ERROR Exception C. Raises the CURSOR_NOT_FOUND Exception D. Does not raise an exception

2. In the FOR UPDATE clause in cursors
    A. Lock is not obtained on the rows fetched B. All locks are released when COMMIT is issued C. Locks for the rows processed before the COMMIT, are released D. Locks are released when the cursor is closed

3. If a User-defined Exception has the same name as a Predefined Exception
    A. There is a compilation error B. The User-defined Exception overrides the Predefined Exception C. The Predefined Exception overrides the User-defined Exception D. None of the above

4. If a row is attempted to be fetched from an unallocated row in a PL/SQL table
    A. A NULL value is returned B. The VALUE_ERROR Exception is raised C. The NO_DATA_FOUND Exception is raised D. The value of the data returned cannot be predicted

5. Given this procedure Procedure dept_salary (v_bonus IN BOOLEAN, v_raise IN BOOLEAN, v_issue_chk IN OUT BOOLEAN) IS BEGIN v_issue_chk := v_bonus OR v_raise; END; If v_bonus = TRUE and v_raise = NULL, which value is assigned to v_issue_chk?
    A. True B. False C. NULL D. None

6. You create a view with the following statement CREATE VIEW COW_MILK_VW AS (Select cow_name, milk_type from COW_MILK); What will happen when a user attempts to INSERT a new cow_name and milk_type via this view?
    A. The INSERT will fail. B. The INSERT will succeed or fail based on whether the user can see the record once added. C. The INSERT will succeed D. The INSERT will succeed only if the user has the privilege to insert data E. into the view. F. The INSERT will succeed only if the user has the privilege to insert data G. into the table.

7. Which of the following objects are dropped automatically when a table is dropped.
    A. Procedure B. Constraints C. Views D. Synonyms

8. Consider the following four options from a single statement. Which of the following lines in the SELECT statement below contain an error.
    A. SELECT DECODE (EMPID, 58385,’INACTIVE’,’ACTIVE’) EMPID B. FROM EMP C. WHERE SUBSTR (LASTNAME, 1, 1) > TO_NUMBER (‘S’) D. AND EMPID > 02000 E. ORDER BY EMPID DESC, LASTNAME ASC;

9. User ‘Janko’ would like to insert a row into the Emp table, which has 3 columns: empid, lastname, salary. The user would like to enter data for empid 59694, lastname Harry, but no salary. Which statement would work best.
    A. INSERT INTO EMP VALUES (59694,’Harry’, NULL); B. INSERT INTO EMP VALUES (59694,’Harry’); C. INSERT INTO EMP (empid, lastname, salary) VALUES (59694,’Harry’); D. INSERT INTO EMP VALUES (Select 59694 from ‘Harris’); E. INSERT INTO EMP(empid, lastname) VALUES (59694,’Harry’);

10. Examine the trigger CREATE OR REPLACE TRIGGER upd_team_salary FOR EACH ROW BEGIN Update team Set salary = tot_salary + :new.salary Where ID = :new.team_id; END; Which statement must be added to make this trigger execute after updating the salary column of player table
    A. After update on player B. After salary update of player C. After update [salary] on player D. After update of salary on player

11. For every new ballplayer added to the Player table, a record must be inserted into the Player_Bat_Stat table. You have written a trigger to accomplish this task. To which timing will this trigger be assigned.
    A. After B. Instead of C. Statement D. Pre-Insert

12. Which of the following is one of the benefits of using procedures and functions
    A. Procedures and functions increase the number of calls to the database. B. Procedures and functions are reparsed for multiple users by exploiting shared SQL areas. C. Procedures and functions avoid reparsing for multiple users by exploiting shared SQL areas. D. Testing of procedures and functions requires the database to the restarted to clear out shared SQL areas for future access.

13. Overall logical structure of a database can be expressed graphically by ______________
    A. ER diagram B. Records C. Relations D. Hierarchy

14. A table can have maximum _____________ no. Of Long Raw datatype columns
    A. One B. No limit C. 255 D. depends on tablespace

15. A user is setting up a join operation between Emp and Dept tables. The query should return all the employees, which are assigned dept, as well as the employees which are yet not assigned any dept.
    A. Select e.empid, d.head from emp e, dept d; B. Select e.empid, d.head from emp e, dept d where e.deptno = d.deptno; C. Select e.empid, d.head from emp e, dept d where e.deptno = d.deptno (+); D. Select e.empid, d.head from emp e, dept d where e.deptno (+)= d.deptno;

Page 1 2 3 4 5 6 7 >>>
Page 1 2 3 4 5 6 7 >>>