Quiznetik

DataBase Management System (DBMS) | Set 14

1. Which of the following is the default trigger that is created using the CREATE TRIGGER command?

Correct : B. Statement level Trigger

2. Which of the following command is used to delete a trigger?

Correct : C. DROP TRIGGER

3. What is the name of a trigger that initiates another trigger?

Correct : C. Cascading Trigger

4. Which of the following specifies a boolean expression that must be true for the trigger to fire?

Correct : C. Trigger Restriction

5. Which of the following trigger will be executed before modifying each row affected by the triggering statement?

Correct : C. Before Row Trigger

6. Which of the following is not true in case of triggers?

Correct : A. Triggers accept parameters.

7. A database is divided into logical storage units called as

Correct : C. Tablespaces

8. A file used to govern the initialization of the instance is known as

Correct : B. Parameter file

9. SGA stands for

Correct : C. System Global Area

10. Under which two circumstances do you design database triggers? (Choose two)

Correct : C. To guarantee that when a specific operation is performed, related actions are perform

11. This statement fails when executed: CREATE OR REPLACE TRI GGER CALC_TEAM_AVG AFTER I NSERT ON PLAYER BEGIN INSERT INTO PLAYER_BATSTAT ( PLAYER_I D, SEASON_YEAR, AT_BATS, HI TS) VALUES ( : NEW. I D, 1 997, 0, 0) ; END; To which type must you convert the trigger to correct the error?

Correct : A. Row

12. The OLD and NEW qualifiers can be used in which type of trigger?

Correct : A. Row level DML trigger

13. Trigger are not supported in

Correct : C. Views

14. The CREATE TRIGGER statement is used to create the trigger. THE _____ clause specifies the table name on which the trigger is to be attached. The ______ specifies that this is an AFTERINSERT trigger.

Correct : B. On, for insert

15. What are the after triggers ?

Correct : B. These triggers run after an insert, update or delete on a table

16. The variables in the triggers are declared using

Correct : B. @

17. Which of the following is NOT an Oracle-supported trigger?

Correct : B. DURING

18. Which of the following is true concerning triggers?

Correct : C. They have an event, condition, and action.

19. Which prefixes are available to Oracle triggers?

Correct : C. Both :new and : old

20. Which type of entity represents a logical generalization whose actual occurrence is represented by a second, associated entity?

Correct : C. Archetype entity

21. Which of the following is the preferred way to recover a database after a transaction in progress terminates abnormally?

Correct : A. Rollback

22. Concurrency control is important for which of the following reasons?

Correct : A. To ensure data integrity when updates occur to the database in a multiuser environment

23. The transaction log includes which of the following?

Correct : D. The essential data of the record

24. Which of the following is not true of SQL views?

Correct : A. Oracle views cannot use the ORDER BY clause in view definitions.

25. What is the type of Oracle backup in which all uncommitted changes have been removed from the datafiles?

Correct : B. Consistent backup

26. Which of the following is true concerning a procedure?

Correct : C. They include procedural and SQL statements.

27. A CASE SQL statement is which of the following?

Correct : A. A way to establish an IF-THEN-ELSE in SQL.

28. Which of the following statements is true concerning routines and triggers?

Correct : A. Both consist of procedural code.

29. How many bytes does each character in the UTF8 encoding take up?

Correct : D. All mentioned above

30. PL/SQL has two types of subprograms, procedures and functions. Which subprogram isused to compute a value?

Correct : B. Function

31. Which datatype is not allowed in the definition of PL/SQL record?

Correct : A. A Collection

32. In the SQL Cursor, which attribute is TRUE when a cursor has some remaining rows to fetch, and FALSE when a cursor has no rows left to fetch?

Correct : B. %FOUND

33. For which Exception, if a SELECT statement attempts to retrieve data based on its conditions, this exception is raised when no rows satisfy the SELECT criteria?

Correct : D. DUP_VAL_ON_INDEX

34. In the PL/SQL block below, how many rows will be inserted in the messages table? DECLARE v_start_salesNUMBER := 2; v_end_sales NUMBER := 100; BEGIN FOR i IN v_start_sales..v_end_sales LOOP INSERT INTO messages(msgid) VALUES v_start_sales; END LOOP; END;

Correct : B. 99

35. Which collection types is also known as index-by tables, lets you look up elements Using arbitrary numbers and strings for subscript values?

Correct : A. Associative arrays

36. Assigning a value to a collection element can cause exceptions, such as

Correct : D. All mentioned above

37. Which is a procedural extension of Oracle- SQL that offers language constructs similar tothose in imperative programming languages?

Correct : C. PL/SQL

38. Which of the following retains duplicate rows in the result of a query or in an Aggregate expression?

Correct : A. ALL

39. Which of the following is an aggregate function in SQL?

Correct : D. Max

40. Which command is used to add a column to an existing table?

Correct : C. Alter

41. A deadlock exists in the system if and only if the wait for graph:

Correct : A. has a cycle in it

42. Rollback of transactions is normally used to:

Correct : A. recover from transaction failure

43. The DBMS language component which can be embedded in a program is

Correct : B. The data manipulation language (DML).

44. The statement in SQL which allows to change the definition of a table is

Correct : A. Alter.

45. A DBMS query language is designed to

Correct : D. all of the above.

46. Which of the following is correct

Correct : D. None of these

47. Which of the following is a valid SQL type?

Correct : D. All of the above

48. Which of the following is a legal expression in SQL?

Correct : B. SELECT NAME FROM EMPLOYEE;

49. If every non-key attribute is functionally dependent on the primary key, then the relation will be in:

Correct : C. Third normal form

50. Given the functional dependencies X →W; X→Y; Y→Z and Z→PQ Which of the following doesn’t hold well?

Correct : B. W→Z

51. Relations produced from an E-R model will always be in

Correct : C. Third normal form

52. Third normal form is inadequate in situation where the relation

Correct : A. Has multiple candidate keys

53. If a relation scheme is in BCNF, then it is also in

Correct : C. Third normal form

54. A primary key when combined with a foreign key create

Correct : A. Parent child relationship between the tables that connect them.

55. The set of permitted value for each attribute is called its

Correct : C. Domain

56. The airline reservation system, the enables are date, flight number, place of departure, destination, type of plane & seats available. The primary key is

Correct : C. Flight number+ date

57. A functional dependency of the form X→Y is trivial if

Correct : A. YC= X

58. The concept of locking can be used to solve the problem of

Correct : A. Lost update

59. Assume transaction A holds a shared lock R. If transaction B also requests for a shared lock on R.

Correct : B. It will immediately be granted.

60. A schedule S of n transactions is serializable if it is equivalent to some

Correct : A. Serial schedule of the same n transactions.

61. In two-phase locking protocol.

Correct : B. All locking operations precede the first unlock operation.

62. Transaction timestamp is:

Correct : C. Unique identifier assigned to each transaction.

63. The granularity of a database item can be chosen to be

Correct : D. All of the above.

64. If the complete execution of the transaction(s) takes the database from one consistent state to the other then that property of transaction is called:

Correct : C. Consistency preservation

65. Which of the following is not the state that the transaction undergoes?

Correct : D. Non active

66. Timestamp can be generated by:

Correct : D. Both (a) and (b)

67. Which of the following is the formal process for deciding which attributes should be grouped together in a relation?

Correct : A. Normalization

68. Who developed normalization process?

Correct : B. E.F. Codd

69. Who developed the BCNF?

Correct : D. Boyce and Codd

70. What is the expansion of BCNF?

Correct : B. Boyce-Codd Normal Form

71. Which of the following is the result of a transitive dependency?

Correct : D. All of the above

72. Which of the following is true?

Correct : D. All of the above

73. How many inference rules are there for functional dependencies?

Correct : C. 6

74. Which property ensures that each functional dependency is represented in some individual relations resulting after decomposition?

Correct : A. Dependency preservation property

75. Every relation in BCNF is also in

Correct : A. 3NF

76. A table that contains one or more repeating groups is in which normal form?

Correct : D. Unnormalized Form

77. A relation is said to be in 3 NF if (i) it is in 2 NF (ii) non-key attributes are independent of one another (iii) key attribute is not dependent on part of a composite key (iv) has no multi-valued dependency

Correct : C. i and ii

78. Given the following relation it is not 3 NF because Student (roll no, name, course no, course max. marks, year of study, address)

Correct : C. non-key attributes course no and course max. marks are functionally dependent

79. Given the following relation Student (roll no, name, course no, course max. marks, year of study, address) The corresponding 3 NF relations are

Correct : B. student ( roll no, name, year of study, address) student (roll no, course no) course (course no, course max. marks)

80. BoyeCodd Normal Form (BCNF) is needed when

Correct : C. there are two or more possible composite overlapping keys and one attributeof a composite key is dependent on an attribute of another composite key

81. A relation is said to be in BCNF when

Correct : D. it has no overlapping composite keys which have related attributes

82. A 3 NF relation is converted to BCNF by

Correct : C. dependent attributes of overlapping composite keys are put in a separateRelation

83. BCNF is needed because

Correct : D. when there is dependent attributes in two possible composite keys one of the attributes is unnecessarily duplicated in the tuples

84. Given the relation Supplier(s_id, p_order, s_name, qty) Given that there is a unique s_name for each s_id and that s_id, p_order is a composite key, find the correct statement among the following: i. this relation is a BCNF ii. this is 3 NF relation iii. this is a 2 NF relation iv. this is a 1 NF relation

Correct : D. i and iii

85. A relation project guidance Project Guidance(professor, project, student no. st-name, dept) A professor can give many projects to many students A project will have many students A project may be guided by many professors The 4 NF relation corresponding to this are

Correct : B. Prof_stud (professor, student no) Proj_stud (project, student no)

86. A 3 NF relation is split into 4 NF

Correct : B. by splitting into relations which do not have more than one independent multi valued dependency

87. Using the SQL GROUP BY phrase with a SELECT statement can help detect which of the following problems?

Correct : B. The inconsistent values problem

88. What SQL command will allow you to change the table STUDENT to add the constraint named GradeCheck that states that the values of the Grade column must be greater than 0?

Correct : C. ALTER TABLE STUDENT ADD CONSTRAINT GradeCheck CHECK (Grade > 0);

89. The NOT EXISTS keyword will be true if:

Correct : B. all rows in the subquery fail the condition.

90. Changing cardinalities in a database is:

Correct : A. a common database design task.

91. Which one of the following sorts rows in SQL?

Correct : C. ORDER BY

92. The SQL keyword(s) ________ is used with wildcards.

Correct : A. LIKE only

93. If a relationship has a cascade updates constraint, then if ________ in the parent table is changed, then the same change will automatically be made to any corresponding foreign key value.

Correct : A. the primary key

94. For every relationship, how many possible types of actions are there when enforcing minimum cardinalities?

Correct : D. Six

95. In creating a procedure, you may get a message if you have compile errors. Which of the following is true?

Correct : C. To see the errors, enter SHOW ERRORS in SQL*Plus.

96. Which of the following is not true about indexes?

Correct : D. Indexes are created with the ALTER TABLE command.

97. In ……….. normal forms, any multivalued attributes have been removed.

Correct : A. First

98. A (n) …………….. is an attribute in a relation that serves as a primary key of another relation in the same.

Correct : C. Identifier key

99. In the process of decomposition is called as

Correct : A. Normalization

100. A relation Schema R is in ……….. if it is in 3NF and satisfies an additional constant thatfor every FD X->A. X must be a candidate key.

Correct : D. BCNF