309
119.5k
Chapter:

1200+ more mcqs Solved MCQs

in DataBase Management System (DBMS)

These multiple-choice questions (MCQs) are designed to enhance your knowledge and understanding in the following areas: Computer Science Engineering (CSE) , Bachelor of Science in Computer Science FY (BSc CS) , Bachelor of Science in Computer Science SY (BSc CS) , Bachelor of Science in Information Technology SY (BSc IT) , Bachelor of Computer Applications (BCA) .

Chapters

More MCQs
1101.

SGA stands for

A. System Go Ahead
B. Software Global Area
C. System Global Area
D. None of the above
Answer» C. System Global Area
1102.

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

A. To duplicate the functionality of other triggers.
B. To replicate built-in constraints in the Oracle server such as primary key and foreign key.
C. To guarantee that when a specific operation is performed, related actions are perform
Answer» C. To guarantee that when a specific operation is performed, related actions are perform
1103.

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?

A. Row
B. Statement
C. ORACLE FORM trigger
D. Before
Answer» A. Row
1104.

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

A. Row level DML trigger
B. Row level system trigger
C. Statement level DML trigger
D. Row level application trigger
Answer» A. Row level DML trigger
1105.

Trigger are not supported in

A. Delete
B. Update
C. Views
D. All of the mentioned
Answer» C. Views
1106.

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.

A. for insert, on
B. On, for insert
C. For, insert
D. Both a and c
Answer» B. On, for insert
1107.

What are the after triggers ?

A. Triggers generated after a particular operation
B. These triggers run after an insert, update or delete on a table
C. These triggers run after an insert, views, update or delete on a table
D. Both b and c
Answer» B. These triggers run after an insert, update or delete on a table
1108.

The variables in the triggers are declared using

A. -
B. @
C. /
D. /@
Answer» B. @
1109.

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

A. BEFORE
B. DURING
C. AFTER
D. INSTEAD OF
Answer» B. DURING
1110.

Which of the following is true concerning triggers?

A. We do not create them with SQL.
B. They execute against only some applications that access a database.
C. They have an event, condition, and action.
D. They cannot cascade (cause another trigger to fire).
Answer» C. They have an event, condition, and action.
1111.

Which prefixes are available to Oracle triggers?

A. : new only
B. : old only
C. Both :new and : old
D. Neither :new nor : old
Answer» C. Both :new and : old
1112.

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

A. Supertype entity
B. Subtype entity
C. Archetype entity
D. Instance entity
Answer» C. Archetype entity
1113.

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

A. Rollback
B. Rollforward
C. Switch to duplicate database
D. Reprocess transactions
Answer» A. Rollback
1114.

Concurrency control is important for which of the following reasons?

A. To ensure data integrity when updates occur to the database in a multiuser environment
B. To ensure data integrity when updates occur to the database in a single-user environment
C. To ensure data integrity while reading data occurs to the database in a multiuser environment
D. To ensure data integrity while reading data occurs to the database in a singleuser environment
Answer» A. To ensure data integrity when updates occur to the database in a multiuser environment
1115.

The transaction log includes which of the following?

A. The before-image of a record
B. The after-image of a record
C. The before and after-image of a record
D. The essential data of the record
Answer» D. The essential data of the record
1116.

Which of the following is not true of SQL views?

A. Oracle views cannot use the ORDER BY clause in view definitions.
B. Oracle views are created using the standard SQL-92 CREATE VIEW command.
C. Oracle views can by queri
Answer» A. Oracle views cannot use the ORDER BY clause in view definitions.
1117.

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

A. Full backup
B. Consistent backup
C. Inconsistent backup
D. Differential backup
Answer» B. Consistent backup
1118.

Which of the following is true concerning a procedure?

A. You do not create them with SQL.
B. They do not need to have a unique name.
C. They include procedural and SQL statements.
D. They are the same thing as a function.
Answer» C. They include procedural and SQL statements.
1119.

A CASE SQL statement is which of the following?

A. A way to establish an IF-THEN-ELSE in SQL.
B. A way to establish a loop in SQL.
C. A way to establish a data definition in SQL.
D. All of the above.
Answer» A. A way to establish an IF-THEN-ELSE in SQL.
1120.

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

A. Both consist of procedural code.
B. Both have to be called to operate.
C. Both run automatically.
D. Both are stored in the database.
Answer» A. Both consist of procedural code.
1121.

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

A. 1
B. 2
C. 3
D. All mentioned above
Answer» D. All mentioned above
1122.

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

A. Procedure
B. Function
C. Both A & B
D. None of the above
Answer» B. Function
1123.

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

A. A Collection
B. A Scalar
C. Both A & B
D. None of the above
Answer» A. A Collection
1124.

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?

A. %ROWCOUNT
B. %FOUND
C. %NOTFOUND
D. %ISOPEN
Answer» B. %FOUND
1125.

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?

A. TOO_MANY_ROWS
B. NO_DATA_FOUND
C. VALUE_ERROR
D. DUP_VAL_ON_INDEX
Answer» D. DUP_VAL_ON_INDEX
1126.

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;

A. 0
B. 99
C. 1
D. 100
Answer» B. 99
1127.

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

A. Associative arrays
B. Nested tables
C. Varrays
D. None of the above
Answer» A. Associative arrays
1128.

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

A. If the subscript is NULL or is not convertible to the right datatype, PL/SQL raises the predefined exception VALUE_ERROR. Usually, the subscript must be an integer. Associative arrays can also be declared to have VARCHAR2 subscripts.
B. If the subscript refers to an uninitialized element, PL/SQL raises SUBSCRIPT_BEYOND_COUNT.
C. If the collection is atomically null, PL/SQL raises COLLECTION_IS_NULL.
D. All mentioned above
Answer» D. All mentioned above
1129.

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

A. PQL
B. Advanced SQL
C. PL/SQL
D. SQL
Answer» C. PL/SQL
1130.

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

A. ALL
B. DISTINCT
C. PRIOR
D. None of the above
Answer» A. ALL
1131.

Which of the following is an aggregate function in SQL?

A. Union
B. Like
C. Group By
D. Max
Answer» D. Max
1132.

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

A. Create
B. Update
C. Alter
D. None of these
Answer» C. Alter
1133.

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

A. has a cycle in it
B. has a path from first node to last node
C. is a tree
D. none of the above
Answer» A. has a cycle in it
1134.

Rollback of transactions is normally used to:

A. recover from transaction failure
B. update the transaction
C. retrieve old records
D. repeat a transaction
Answer» A. recover from transaction failure
1135.

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

A. The data definition language (DDL).
B. The data manipulation language (DML).
C. The database administrator (DBA).
D. A query language
Answer» B. The data manipulation language (DML).
1136.

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

A. Alter.
B. Update.
C. Create.
D. select.
Answer» A. Alter.
1137.

A DBMS query language is designed to

A. support end users who use English-like commands.
B. support in the development of complex applications software.
C. specify the structure of a database.
D. all of the above.
Answer» D. all of the above.
1138.

Which of the following is correct

A. a SQL query automatically eliminates duplicates.
B. SQL permits attribute names to be repeated in the same relation.
C. a SQL query will not work if there are no indexes on the relations
D. None of these
Answer» D. None of these
1139.

Which of the following is a valid SQL type?

A. CHARACTER
B. NUMERIC
C. FLOAT
D. All of the above
Answer» D. All of the above
1140.

Which of the following is a legal expression in SQL?

A. SELECT NULL FROM EMPLOYEE;
B. SELECT NAME FROM EMPLOYEE;
C. SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL;
D. none of the above
Answer» B. SELECT NAME FROM EMPLOYEE;
1141.

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

A. First normal form
B. Second normal form
C. Third normal form
D. Fourth normal form
Answer» C. Third normal form
1142.

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

A. X→Z
B. W→Z
C. X→WY
D. None of the above
Answer» B. W→Z
1143.

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

A. First normal form
B. Second normal form
C. Third normal form
D. Fourth normal form
Answer» C. Third normal form
1144.

Third normal form is inadequate in situation where the relation

A. Has multiple candidate keys
B. Has candidate keys that are composite
C. Has overlapped candidate keys
D. None of the above
Answer» A. Has multiple candidate keys
1145.

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

A. First normal form
B. Second normal form
C. Third normal form
D. Fourth normal form
Answer» C. Third normal form
1146.

A primary key when combined with a foreign key create

A. Parent child relationship between the tables that connect them.
B. Network model between the tables that connect them.
C. Many-to-many relationship between the tables that connect them.
D. None of the above.
Answer» A. Parent child relationship between the tables that connect them.
1147.

The set of permitted value for each attribute is called its

A. Attribute set
B. Attentive range
C. Domain
D. Group
Answer» C. Domain
1148.

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

A. Flight number
B. Flight number + place of departure
C. Flight number+ date
D. Flight number + destination
Answer» C. Flight number+ date
1149.

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

A. YC= X
B. Y C X
C. X C =Y
D. X C Y and Y C X
Answer» A. YC= X
1150.

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

A. Lost update
B. Uncommitted dependency
C. Inconsistent data
D. Deadlock
Answer» A. Lost update

Done Studing? Take A Test.

Great job completing your study session! Now it's time to put your knowledge to the test. Challenge yourself, see how much you've learned, and identify areas for improvement. Don’t worry, this is all part of the journey to mastery. Ready for the next step? Take a quiz to solidify what you've just studied.