On This Page

This set of DataBase Management System (DBMS) Multiple Choice Questions & Answers (MCQs) focuses on Database Management System Set 54

Q1 | Which of the following is true concerning a procedure?
  • You do not create them with SQL.
  • They do not need to have a unique name.
  • They include procedural and SQL statements.
  • They are the same thing as a function.
Q2 | A CASE SQL statement is which of the following?
  • A way to establish an IF-THEN-ELSE in SQL.
  • A way to establish a loop in SQL.
  • A way to establish a data definition in SQL.
  • All of the above.
Q3 | Which of the following statements is true concerning routines and triggers?
  • Both consist of procedural code.
  • Both have to be called to operate.
  • Both run automatically.
  • Both are stored in the database.
Q4 | How many bytes does each character in the UTF8 encoding take up?
  • 1
  • 2
  • 3
  • All mentioned above
Q5 | PL/SQL has two types of subprograms, procedures and functions. Which subprogram isused to compute a value?
  • Procedure
  • Function
  • Both A & B
  • None of the above
Q6 | Which datatype is not allowed in the definition of PL/SQL record?
  • A Collection
  • A Scalar
  • Both A & B
  • None of the above
Q7 | 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?
  • %ROWCOUNT
  • %FOUND
  • %NOTFOUND
  • %ISOPEN
Q8 | 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?
  • TOO_MANY_ROWS
  • NO_DATA_FOUND
  • VALUE_ERROR
  • DUP_VAL_ON_INDEX
Q9 | 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;
  • 0
  • 99
  • 1
  • 100
Q10 | Which collection types is also known as index-by tables, lets you look up elements Using arbitrary numbers and strings for subscript values?
  • Associative arrays
  • Nested tables
  • Varrays
  • None of the above
Q11 | Assigning a value to a collection element can cause exceptions, such as
  • 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.
  • If the subscript refers to an uninitialized element, PL/SQL raises SUBSCRIPT_BEYOND_COUNT.
  • If the collection is atomically null, PL/SQL raises COLLECTION_IS_NULL.
  • All mentioned above
Q12 | Which is a procedural extension of Oracle- SQL that offers language constructs similar tothose in imperative programming languages?
  • PQL
  • Advanced SQL
  • PL/SQL
  • SQL
Q13 | Which of the following retains duplicate rows in the result of a query or in an Aggregate expression?
  • ALL
  • DISTINCT
  • PRIOR
  • None of the above
Q14 | Which of the following is an aggregate function in SQL?
  • Union
  • Like
  • Group By
  • Max
Q15 | Which command is used to add a column to an existing table?
  • Create
  • Update
  • Alter
  • None of these
Q16 | A deadlock exists in the system if and only if the wait for graph:
  • has a cycle in it
  • has a path from first node to last node
  • is a tree
  • none of the above
Q17 | Rollback of transactions is normally used to:
  • recover from transaction failure
  • update the transaction
  • retrieve old records
  • repeat a transaction
Q18 | The DBMS language component which can be embedded in a program is
  • The data definition language (DDL).
  • The data manipulation language (DML).
  • The database administrator (DBA).
  • A query language
Q19 | The statement in SQL which allows to change the definition of a table is
  • Alter.
  • Update.
  • Create.
  • select.
Q20 | A DBMS query language is designed to
  • support end users who use English-like commands.
  • support in the development of complex applications software.
  • specify the structure of a database.
  • all of the above.
Q21 | Which of the following is correct
  • a SQL query automatically eliminates duplicates.
  • SQL permits attribute names to be repeated in the same relation.
  • a SQL query will not work if there are no indexes on the relations
  • None of these
Q22 | Which of the following is a valid SQL type?
  • CHARACTER
  • NUMERIC
  • FLOAT
  • All of the above
Q23 | Which of the following is a legal expression in SQL?
  • SELECT NULL FROM EMPLOYEE;
  • SELECT NAME FROM EMPLOYEE;
  • SELECT NAME FROM EMPLOYEE WHERE SALARY = NULL;
  • none of the above
Q24 | If every non-key attribute is functionally dependent on the primary key, then therelation will be in:
  • First normal form
  • Second normal form
  • Third normal form
  • Fourth normal form
Q25 | Given the functional dependencies X →W; X→Y; Y→Z and Z→PQ Which of the following doesn’t hold well?
  • X→Z
  • W→Z
  • X→WY
  • None of the above