330
120.4k

1410+ DataBase Management System (DBMS) Solved MCQs

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
1301.

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

A. Row level Trigger
B. Statement level Trigger
C. BEFORE Trigger
D. AFTER Trigger
Answer» B. Statement level Trigger
1302.

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

A. DELETE TRIGGER
B. REPLACE TRIGGER
C. DROP TRIGGER
D. None of the above
Answer» C. DROP TRIGGER
1303.

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

A. Triggering Trigger
B. Automatic Initiation Trigger
C. Cascading Trigger
D. None of the above
Answer» C. Cascading Trigger
1304.

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

A. Trigger Action
B. Triggering Event
C. Trigger Restriction
D. None of the above
Answer» C. Trigger Restriction
1305.

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

A. Before Statement Trigger
B. After Row Trigger
C. Before Row Trigger
D. None of the above
Answer» C. Before Row Trigger
1306.

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

A. Triggers accept parameters.
B. Triggers are executed implicitly
C. Execution of triggers is transparent to the users.
D. A trigger can invoke another trigger.
Answer» A. Triggers accept parameters.
1307.

A database is divided into logical storage units called as

A. Tables
B. Records
C. Tablespaces
D. None of the above
Answer» C. Tablespaces
1308.

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

A. Shared file
B. Parameter file
C. Read-only file
D. None of the above
Answer» B. Parameter file
1309.

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
1310.

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
1311.

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
1312.

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
1313.

Trigger are not supported in

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

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
1315.

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
1316.

The variables in the triggers are declared using

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

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

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

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.
1319.

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
1320.

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
1321.

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
1322.

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
1323.

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
1324.

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.
1325.

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
1326.

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.
1327.

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.
1328.

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.
1329.

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
1330.

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
1331.

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
1332.

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
1333.

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
1334.

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
1335.

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
1336.

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
1337.

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
1338.

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
1339.

Which of the following is an aggregate function in SQL?

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

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
1341.

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
1342.

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
1343.

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).
1344.

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.
1345.

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.
1346.

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
1347.

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
1348.

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;
1349.

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
1350.

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

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.