MCQ RDBMS

Multiple Choice Questions and Answers

MCQ on Relational Database Management System


1.    MCQ: In the relational model, the row of the table is known to be
A.  Relation
B.   Attribute
C.  Tuple
D.  Entity field
Answer 
2.    MCQ: Relational model eases the job of the programmer, compared to earlier data models such as
A.  Network model
B.   Hierarchical model
C.   Semistructured model
D.  Both A and B
Answer 
3.    MCQ: To refer to a specific instance of a relation in the relational model, the term used is known as
A.  Relation instance
B.   Relation entity
C.   Relation tuple
D.  Relation attribute
Answer 
4.    MCQ: A property of the entire relation, rather than of the individual tuples, is known as
A.  Attribute
B.   Constant
C.   Variable
D.  Key
Answer 
Answer 
Answer 
5.    MCQ: Minimal superkeys are called
A.  Unique key
B.   Superset key
C.  Candidate key
D.  Primary key
Answer 
6.    MCQ: A table is a collection of relationships, there is a close correspondence between the concept of
A.  Tables and instances
B.   Tables and Entries
C.   Table and variables
D.  Tables and relations
Answer 
7.    MCQ: The term that says values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation, is called
A.  Constant Integrity constraint
B.   Variable Integrity constraint
C.  Referential Integrity constraint
D.  Attribute Integrity constraint
Answer 
8.    MCQ: A relation, say r1, may include among its attributes the primary key of another relation, say r2. the r1 is also known as
A.  Parent relation
B.   Referenced relation
C.  Referencing relation
D.  Node relation

9.    MCQ: In the relational model, the column of the table is known to be
A.  Entity field
B.  Attribute
C.   Tuple
D.  Relation
a.    Answer 
10.                MCQ: The contents of a relation instance may change with time as the relation
A.  Domain
B.   Time
C.  Updated
D.  Retrieved
Answer 
11.                MCQ: The query languages are usually on a level higher than that of a standard
A.  Updation language
B.   Query program language
C.   Procedural language
D.  Programming language
Answer 
12.                MCQ: Query languages used in practice includes
A.  Elements
B.   Fields
C.   Instances
D.  Tuples
Answer 
13.                MCQ: A set of one or more attributes that collectively, allow us to identify uniquely a tuple in the relation, is known as
A.  Unique key
B.   Special key
C.  Super key
D.  Primary key

14.                MCQ: A relation schema consists of a list of attributes and their corresponding
A.  Variables
B.   Instances
C.  Domains
D.  Tuples
Answer 
15.                MCQ: A row in a table represents a relationship among a
A.  Procedures
B.  Set of values
C.   Sequence of values
D.  Entities
Answer 
16.                MCQ: The logical design of the database, is known to be
A.  Database instance
B.   Database entity
C.   Database relation
D.  Database Schema
Answer 
17.                MCQ: The type of query in which user describes the desired information without giving a specific procedure for obtaining that information, is known to be
A.  Procedural language
B.  Nonprocedural language
C.   Programming language
D.  Query program

18.                MCQ: The address field of a person should not be part of the primary key, since it is likely to
A.  Dependent
B.  Changed
C.   Not changed
D.  Too long
19.                MCQ: The primary key should be chosen such that its attribute values are
A.  Updated
B.   Dependent
C.   Changed
D.  Never changed
20.                MCQ: The user instructs the system to perform a sequence of operations on the database to compute the desired outcome, is known as
A.  Programming language
B.   Query program
C.  Procedural language
D.  Nonprocedural language
Answer 
21.                MCQ: The relational model is today the primary data model for commercial
A.  Data management applications
B.   Data storage applications
C.  Data processing applications
D.  Data program application
Answer 
22.                MCQ: The query language is a language in which a user
A.  Requests
B.   Response
C.   Stores
D.  Represents
Answer 
23.                MCQ: A snapshot of the data in the database at a given instant in time, is known as
A.  Database entity
B.   Database relation
C.  Database instance
D.  Database Schema
Answer
24.                MCQ: We are often interested in superkeys for which no proper subset is a
A.  Superset key
B.  Superkey
C.   Primary key
D.  Unique key

U

1. Which of the following statements is true about implicit cursors?

A. Implicit cursors are used for SQL statements that are not named.
B. Developers should use implicit cursors with great care.
C. Implicit cursors are used in cursor for loops to handle data processing.
D. Implicit cursors are no longer a feature in Oracle.
Ans: A

2. Which of the following is not a feature of a cursor FOR loop?

A. Record type declaration.
B. Opening and parsing of SQL statements.
C. Fetches records from cursor.
D. Requires exit condition to be defined.
Ans:B

3. A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using referential datatypes?

A. Use employee.lname%type.
B. Use employee.lname%rowtype.
C. Look up datatype for EMPLOYEE column on LASTNAME table and use that.
D. Declare it to be type LONG.
Ans: A

4. Which three of the following are implicit cursor attributes?

A. %found
B. %too_many_rows
C. %notfound
D. %rowcount
E. %rowtype
Ans:C

5. If left out, which of the following would cause an infinite loop to occur in a simple loop?

A. LOOP
B. END LOOP
C. IF-THEN
D. EXIT
Ans:B

6. Which line in the following statement will produce an error?

A. cursor action_cursor is
B. select name, rate, action
C. into action_record
D. from action_table;
E. There are no errors in this statement.
Ans:C

7. The command used to open a CURSOR FOR loop is

A. open
B. fetch
C. parse
D. None, cursor for loops handle cursor opening implicitly.
Ans:D

8. What happens when rows are found using a FETCH statement

A. It causes the cursor to close
B. It causes the cursor to open
C. It loads the current row values into variables
D. It creates the variables to hold the current row values
Ans: B

9. What is the maximum number of handlers processed before the PL/SQL block is exited when an exception occurs?

A. Only one
B. All that apply
C. All referenced
D. None
Ans: A

10. For which trigger timing can you reference the NEW and OLD qualifiers?

A. Statement and Row
B. Statement only
C. Row only
D. Oracle Forms trigger
Ans: D

11. Which identifier is valid?

   A. customer_12
   B. loop
   C. customer@orgA
   D. 12customer
  Ans: A

12. What is the value of customer_id within the nested block in the example below?

/* Start main block */
DECLARE
 customer_id NUMBER(9) := 678;
 credit_limit NUMBER(10,2) := 10000;
BEGIN
 /* Start nested block */
DECLARE
 customer_id VARCHAR2(9) := 'AP56';
 current_balance NUMBER(10,2) := 467.87;
BEGIN
-- what is the value of customer_id at this point?
  NULL;
 END;
END;
Please select the best answer.
   A. 678
   B. 10000
   C. 'AP56'
   D. 467.87
  Ans: B.

13. For which task is it best to use a character string enclosed by double quotes? Please select the best answer.

   A. Referring to a column in the database
   B. Using a reserved word to declare an identifier
   C. Using a hyphen to concatenate two columns
   D. Referring to a number variable by using a logical operator
  Ans: B.

14. What is the maximum number of exception handlers processed before the PL/SQL block is exited, provided an exception occurs? Please select the best answer.

   A. None
   B. All exceptions that are referenced in the block
   C. One
   D. All exceptions that apply
  Ans: C.

15. Which functions can be used with any datatype? Please select all the correct answers.

   A. SUM
   B. MIN
   C. MAX
   D. AVG
  The correct answers are B and C.

16.  Select incorrect variable declarations

A. foo_number varchar2(10);
B. foo_text number(10);
C. foo_char char(1) := 'Y';
D. foo_time date;
E. foo_text varchar2(10) := 'hello world';
Ans:  E

17. Select invalid variable types

A. CHAR
B. VARCHAR1
C. VARCHAR2
D. INTEGER
E. NUMBER
ANS: B

18. List the correct sequence of commands to process a set of records when using explicit cursors

A. INITIALIZE, GET, CLOSE
B. CURSOR, GET, FETCH, CLOSE
C. OPEN, FETCH, CLOSE
D. CURSOR, FETCH, CLOSE
E. GET, SEEK, HIDE
ANS:   C

 

19. Select incorrect variable declarations

A. foo_number varchar2(10);
B. foo_text number(10);
C. foo_char char(1) := 'Y';
D. foo_time date;
E. foo_text varchar2(10) := 'hello world';
Ans:  E

20. Select invalid variable types

A. CHAR
B. VARCHAR1
C. VARCHAR2
D. INTEGER
E. NUMBER
ANS: B
 --------------------------------

21.  List the correct sequence of commands to process a set of records when using explicit cursors

A. INITIALIZE, GET, CLOSE
B. CURSOR, GET, FETCH, CLOSE
C. OPEN, FETCH, CLOSE
D. CURSOR, FETCH, CLOSE
E. GET, SEEK, HIDE
 ANS:   C

22. Where do you declare an explicit cursor in the PL/SQL language?

  A. In the PL/SQL working storage section
  B. In the PL/SQL declaration section
  C. In the PL/SQL body section
  D. In the PL/SQL exception section
  E. None of the above
ANS: B
    

23.  

    

24.  The || is is an example of what function

SELECT last_name || ', ' || first_name || ' ' || middle_name

FROM employees;

  A. Incantination
  B. Integration
  C. Continuation
  D. Concatenation
  E. None of the above
ANS: D    

25.  Which of the following is not an Oracle DML function?

  A. DECODE
  B. TRUNCATE
  C. TO_CHAR
  D. NVL
  E. Trick question, all of these are Oracle DML functio
ANS: B

26.  


27.  Select the best answer.  Which listed attribute is an invalid attribute of an Explicit cursor.

  A. %NOTFOUND
  B. %FOUND
  C. %ROWCOUNT
  D. %ISOPEN
  E. None of the above. All of these are valid.
ANS: E

28.  Which of the following is not a grouping function.

  A. COUNT
  B. SUM
  C. DISTINCT
  D. MIN
  E. All of the above.
ANS: C

29.  


 


31.  Select the best answer below.  What are the components of a package?

  A. Box, wrapping and binding
  B. Header and body
  C. Specification and content
  D. Specification and body
  E. None of the above
ANS: D
    

37. If you don't specify a mode for a parameter, what is the default mode? 

a.OUT
b.IN
c.COPY
d.DEFAULT
e.R(ead)
ANS: B


39. What are the three parameter modes for procedures? 

a.IN, OUT, IN OUT
b.R(ead), W(rite), A(ppend)
c.CONSTANT, VARIABLE, DEFAULT
d.COPY, NOCOPY, REF
ANS: A

 41. What is the correct syntax to create procedure MYPROC that accepts two number parameters X and Y? 

a.CREATE PROCEDURE myproc (x NUMBER, y NUMBER) IS ...
b.CREATE PROCEDURE (x NUMBER, y NUMBER) myproc IS ...
c.CREATE PROCEDURE myproc IS (x NUMBER, y NUMBER) ...
d.CREATE PROCEDURE IS myproc (x NUMBER, y NUMBER) ...
ANS: A
----------------------------------------------------------

40. Which one of the following statements about formal and actual parameters is true? 

a.Formal and actual parameters must have the same name.
b.Formal and actual parameters must have different names.
c.A formal parameter is declared within the called procedure, while an actual parameter is declared in thecalling environment.
d.An actual parameter is declared within the called procedure.
ANS: C



42. In the context of MS SQL SERVER, with the exception of ............ column(s), any column can participate in the GROUP BY clause.

A) bit
B) text
C) ntext
D) image
E) All of above
ANS: E

 32. PL/SQL subprograms, unlike anonymous blocks, are compiled each time they are executed. True or False?

a. True
b.False
ANS: A

38. Which kind of parameters cannot have a DEFAULT value? 

a.OUT
b.IN
c.CONSTANT
d.R(ead)
e.W(rite)
ANS: A

 

33. Subprograms and anonymous blocks can be called by other applications. True or False?

            a.True
           b.False
ANS: A

 Select the invalid PL/SQL looping construct.

  A. WHILE LOOP
                ...
                END LOOP;
  B. FOR rec IN some_cursor LOOP
                ...
                END LOOP;
  C. LOOP
                ...
                UNTIL ;
                END LOOP;
  D. LOOP
                ...
                EXIT WHEN ;
                END LOOP;
  E. None of the above. All are valid.
ANS: C.D

34. A nested subprogram can be called from the main procedure or from the calling environment. Trueor False? 

        a.  True
         b. False
ANS: B

Which of the following is not a valid Oracle PL/SQL exception.

  A. NO_DATA_FOUND ORA-01403
  B. TWO_MANY_ROWS ORA-01422
  C. DUP_VAL_ON_INDEX ORA-00001
  D. OTHERS
  E. None of the above. These are all valid.
ANS: B

 Assuming the date and time is 09/09/2009 09:09:09, what value will the following statement return SELECT TO_CHAR(TRUNC(SYSDATE),'MM/DD/YYYY HH24:MI:SS')  FROM dual;

  A. 09/09/2009 09:09:09
  B. 09/09/2009 09:09:09AM
  C. 09/09/2009
  D. 09/09/2009 00:00:00
  E. None of the above 
ANS: D

35. When modifying procedure code, the procedure must be re-executed to validate and store it in the database. True or False? 

    a. True
    b. False
ANS: A

36. Which of the following can be used as an argument for a procedure parameter? 

a.The name of a variable.
b.A literal value.
c.An expression.
d.All of the above.
e.None of the above
ANS: D


43. The sequence of the columns in a GROUP BY clause has no effect in the ordering of the output.

A) True
B) False
ANS: B

44. You want all dates when any employee was hired. Multiple employees were hired on the same date and you want to see the date only once. 

Query - 1
Select distinct hiredate
From hr.employee
Order by hiredate;
Query - 2
Select hiredate
From hr.employees
Group by hiredate
Order by hiredate;
Which of the above query is valid?
A) Query - 1
B) Query - 2
C) Both
ANS: C

45. GROUP BY ALL generates all possible groups - even those that do not meet the query's search criteria. 

A) True
B) False
ANS: A

46. All aggregate functions ignore NULLs except for ............ 

A) Distinct
B) Count (*)
C) Average()
D) None of above
ANS: B

47. Using GROUP BY ............ has the effect of removing duplicates from the data. 

A) with aggregates
B) with order by
C) without order by
D) without aggregates
ANS: D

48. Below query is run in SQL Server 2012, is this query valid or invalid: 

Select count(*) as X
from Table_Name
Group by ()
A) Valid
B) Invalid
ANS: A

49. For the purposes of ............, null values are considered equal to other nulls and are grouped together into a single result row. 

A) Having
B) Group By
C) Both of above
D) None of above
ANS: B

50. If you SELECT attributes and use an aggregate function, you must GROUP BY the non-aggregate attributes.

A) True
B) False
ANS: A

1.     Collections of operations that form a single logical unit of work are called __________
a)     Views
b)     Networks
c)     Units
d)     Transactions
View Answer

Answer: d
Explanation: Collections of operations that form a single logical unit of work are called transactions. A database system must ensure proper execution of transactions.
2.     The “all-or-none” property is commonly referred to as _________
a)     Isolation
b)     Durability
c)     Atomicity
d)     None of the mentioned
View Answer

Answer: c
Explanation: The all or none policy is commonly referred to as atomicity. It ensures that a work is either completed or not completed and there are no intermediate stages.
3.     Which of the following is a property of transactions?
a)     Atomicity
b)     Durability
c)     Isolation
d)     All of the mentioned
View Answer

Answer: d
Explanation: Atomicity, Durability and Isolation are all properties of transactions.
4.     Execution of translation in isolation preserves the _________ of a database
a)     Atomicity
b)     Consistency
c)     Durability
d)     All of the mentioned
View Answer

Answer: b
Explanation: Execution of translation in isolation preserves the consistency of a database. It ensures that no other transaction is running concurrently.
5.     Which of the following is not a property of a transaction?
a)     Atomicity
b)     Simplicity
c)     Isolation
d)     Durability
View Answer

Answer: b
Explanation: Simplicity is not a property of a transaction. Atomicity, Isolation, Durability are all parts of ACID properties.
6.     Which of the following systems is responsible for ensuring durability?
a)     Recovery system
b)     Atomic system
c)     Concurrency control system
d)     Compiler system
View Answer

Answer: a
Explanation: The recovery system is responsible for the maintenance of durability. In addition, it also ensures atomicity.
7.     Which of the following systems is responsible for ensuring isolation?
a)     Recovery system
b)     Atomic system
c)     Concurrency control system
d)     Compiler system
View Answer

Answer: c
Explanation: The concurrency control system is responsible for ensuring isolation in a database system.
9.     A transaction that has not been completed successfully is called as _______
a)     Compensating transaction
b)     Aborted transaction
c)     Active transaction
d)     Partially committed transaction
View Answer

Answer: b
Explanation: Aborted transaction is a state after the transaction has been rolled back and the database has been restored to the state prior to the transaction.
10.   Which of the following is not a transaction state?
a)     Active
b)     Partially committed
c)     Failed
d)     Compensated
View Answer

Answer: d
Explanation: Compensated is not a transaction state. But active, partially committed and failed are different states of a transaction.
advertisement

11.   The execution sequences in concurrency control are termed as ________
a)     Serials
b)     Schedules
c)     Organizations
d)     Time tables
View Answer

Answer: b
Explanation: The execution sequences in concurrency control are known as schedules.
12.   The scheme that controls the interaction between executing transactions is called as _____
a)     Concurrency control scheme
b)     Multiprogramming scheme
c)     Serialization scheme
d)     Schedule scheme
View Answer

Answer: a
Explanation: The scheme that controls the interaction between executing transactions is called as concurrency control scheme.

1.     I and J are _________ if they are operations by different transactions on the same data item, and at least one of them is a write operation.
a)     Conflicting
b)    Overwriting
c)     Isolated
d)    Durable
View Answer

Answer: a
Explanation: I and J are conflicting if they are operations by different transactions on the same data item, and at least one of them is a write operation.


2.     If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are
a)     Non conflict equivalent
b)    Equal
c)     Conflict equivalent
d)    Isolation equivalent
View Answer

Answer: c
Explanation: If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are conflict equivalent. Not all serial schedules are conflict equivalent to each other.
3.     A schedule is __________ if it is conflict equivalent to a serial schedule.
a)     Conflict serializable
b)    Conflicting
c)     Non serializable
d)    None of the mentioned
View Answer

Answer: a
Explanation: A schedule is conflict serializable if it is conflict equivalent to a serial schedule. The concept of conflict equivalence leads to the concept.

4.     The set of ________ in a precedence graph consists of all the transactions participating in the schedule
a)     Vertices
b)    Edges
c)     Directions
d)    None of the mentioned
View Answer

Answer: a
Explanation: The set of vertices in a precedence graph consists of all the transactions participating in the schedule. Precedence graph is a simple and efficient way of determining conflict serializability of the schedule.
-------------------------------------------------------------------------
5.     A ___________of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph.
a)     Serializability order
b)    Direction graph
c)     Precedence graph
d)    Scheduling scheme
View Answer

Answer: a
Explanation: A Serializability order of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph. This process is called as topological sorting.
6.     State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter.
a)     True
b)    False
View Answer

Answer: a
Explanation: If I = read(Q) and J = read(Q) then the order of I and J does not matter because both I and J are read operations on the query.

State true or false: Information residing in the volatile storage does not usually survive system crashes
a)     True
b)     False
View Answer

Answer: a

7.     State true or false: If I = read(Q) and J = write(Q) then the order of I and J does not matter.
a)     True
b)    False
View Answer

Answer: b
Explanation: If I = read(Q) and J = write(Q) then the order of I and J matters because both I and J are different operations on the query. The order of execution determines the state of the database that is being read or written.
advertisement


1.     If a transaction has obtained a __________ lock, it can read but cannot write on the item
a)     Shared mode
b)    Exclusive mode
c)     Read only mode
d)    Write only mode
View Answer

Answer: a
Explanation: If a transaction Ti has obtained a shared-mode lock (denoted by S) on item Q, then Ti can read, but cannot write, Q.
2.     If a transaction has obtained a ________ lock, it can both read and write on the item
a)     Shared mode
b)    Exclusive mode
c)     Read only mode
d)    Write only mode
View Answer

Answer: b
Explanation: If a transaction has obtained an exclusive mode lock, then it can both read and write on the item on which it in operating.
3.     A transaction can proceed only after the concurrency control manager ________ the lock to the transaction
a)     Grants
b)    Requests
c)     Allocates
d)    None of the mentioned
View Answer

Answer: a
Explanation: A transaction can proceed only after the concurrency control manager grants the lock to the transaction.
4.     If a transaction can be granted a lock on an item immediately in spite of the presence of another mode, then the two modes are said to be ________
a)     Concurrent
b)    Equivalent
c)     Compatible
d)    Executable
View Answer

Answer: c
Explanation: If a transaction can be granted a lock on an item immediately in spite of the presence of another mode, then the two modes are said to be compatible.
7.     The situation where no transaction can proceed with normal execution is known as ________
a)     Road block
b)    Deadlock
c)     Execution halt
d)    Abortion
View Answer

Answer: b
Explanation: The situation where no transaction can proceed with normal execution is known as a deadlock.

10.  The two phase locking protocol consists which of the following phases?
a)     Growing phase
b)    Shrinking phase
c)     both a,b
d)    None of the mentioned
View Answer

Answer: c
Explanation: The two phased locking protocol consists of the growing phase and the shrinking phase.

1.    
2.     Which of the following is not a method in deadlock handling
a)     Deadlock prevention
b)    Deadlock detection
c)     Deadlock recovery
d)    Deadlock distribution
View Answer

Answer: d
Explanation: Deadlock distribution is not a method in deadlock handling whereas, deadlock prevention is followed by deadlock detection and deadlock recovery.

3.     Deadlocks can be prevented using
a)     Preemption and transaction rollbacks
b)    Wait and die scheme
c)     Wound-wait scheme
d)    All of the mentioned
View Answer

Answer: d
Explanation: Preemption and transaction rollbacks, wait and die scheme, wound wait scheme are all different methods of deadlock prevention.
4.     State true or false: Wait die scheme is a non-preemptive technique
a)     True
b)    False
View Answer

Answer: a
Explanation: The wait-die scheme is a non-preemptive technique. When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp smaller than that of Tj (that is, Ti is older than Tj ). Otherwise, Ti is rolled back (dies).

5.    
6.     The _________ graph describes deadlocks precisely
a)     Wound wait graph
b)    Wait die graph
c)     Wait for graph
d)    None of the mentioned
View Answer

Answer: c
Explanation: The wait for graph describes deadlocks precisely. Existence of a cycle in this graph implies that a deadlock will occur.
7.     How do we generally recover from a deadlock?
a)     By aborting all the transactions
b)    By rolling back all the transactions
c)     By rolling back only a selected number of transactions
d)    None of the mentioned
View Answer

Answer: c
Explanation: We generally recover from deadlocks by rolling back only a selected number of transactions
Advertisement

8.     State true or false: Partial rollback is not possible.
a)     True
b)    False
View Answer

Answer: b
Explanation: Partial rollback is possible but it requires the system too maintain an additional amount of information on the states of the transactions.
9.     Which of the following steps must be taken while choosing a victim?
a)     Avoiding starvation
b)    Number of transactions involved in rollback
c)     Data items used by the transaction
d)    All of the mentioned
View Answer

Answer: d
Explanation: While choosing a victim we much choose the one with a minimum cost. That is the one which avoids starvation, the one with the least number of transaction involved in the rollback and the one with the least amount of data items used.

7.
9.     In timestamp ordering protocol, suppose that the transaction Ti issues read(Q) and TS(Ti)<W-timestamp(Q), then
a)     Read operation is executed
b)    Read operation is rejected
c)     Write operation is executed
d)    Write operation is rejected
View Answer

Answer: b
1.     The _________ requires each transaction executes in two or three different phases in its lifetime
a)     Validation protocol
b)    Timestamp protocol
c)     Deadlock protocol
d)    View protocol
View Answer

Answer: a
Explanation: The validation protocol requires each transaction to execute in two or three different phases in its lifetime depending on whether it is a read only or an update transaction.
2.     During __________ phase, the system reads data and stores them in variables local to the transaction.
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: a
Explanation: During the read phase, the system reads data and stores them in variables local to the transaction. It performs all write operations on temporary local variables without updates on the actual database.
3.     During the _________ phase the validation test is applied to the transaction
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: b
Explanation: During the validation phase, the validation test is applied to the transaction. This determines whether the transaction is allowed to proceed or not without causing a violation of serializability.
4.     During the _______ phase, the local variables that hold the write operations are copied to the database
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: c
Explanation: During the write phase, the local variables that hold the write operations are copied to the database. Read only operations omit this phase.

1) Which of the following is not a recovery technique?

A. Deferred update
B. Immediate update
C. Two-phase commit
D. Recovery management


2)Checkpoints are a part of

A. Recovery measures

B. Security measures

C. Concurrency measures

D. Authorization measures


3) ....... deals with soft errors, such as power failures.

A. system recovery

B. media recovery

C. database recovery

D. failure recovery


4) ........... is an essential part of any backup system.

A. Filter

B. Recovery

C. Security

D. Scalability


5) Media recovery deals with ...........

A. disk errors

B. hard errors

C. system errors

D. power failures


6) For a backup/restore system, ............. is a prerequisite for service in a enterprise.

A. Filter

B. Recovery

C. Security

D. Scalability


7) Failure recovery and media recovery fall under ........

A. transaction recovery

B. database recovery

C. system recovery

D. value recovery




9) In which the database can be restored up to the last consistent state after the system failure?

A. Backup

B. Recovery

C. Both

D. None






11) In log based recovery, the log is sequence of .........

A. filter

B. records

C. blocks

E.      numbers



13) .......... is an alternative of log based recovery.

A. Disk recovery

B. Shadow paging

C. Dish shadowing

D. Crash recovery
-------------------------------------------------------------------------------------------------------------------

10) A ........... is a block of Recovery Manager(RMAN)job commands that is stored in the recovery catalogue.

A. recovery procedure

B. recovery block

C. stored block

D. stored script

12) The enrolling of a database in a recovery catalogue is called .........

A. set up

B. registration

C. start up

D. enrolment






14) Most backup and recovery commands in ........... are executed by server sessions.

A. Backup Manager

B. Recovery Manager

C. Backup and Recovery Manager

D. Database Manager


15) ........ systems typically allows to replace failed disks without stopping access to the system.

A. RAM

B. RMAN

C. RAD

D. RAID



16) An ......... is an exact copy of a single datafile, archived redo log file, or control file.

A. image copy

B. datafile copy

C. copy log

D. control copy



17) .......... known as memory-style error correcting-code(ECC) organization, employs parity bits.

A. RAID level 1

B. RAID level 2

C. RAID level 3

D. RAID level 4



18) The remote backup site is sometimes called the .......... site.

A. primary

B. secondary

C. ternary

D. None of the above



19) EXP command is used ...........

A. to take Backup of the Oracle Database

B. to import data from the exported dump file

C. to create Rollback segments

D. to create Schedule.



20) The simplest approach to introducing redundancy is to duplicate every disk is called .....

A. mirroring

B. imaging

C. copying

D. All of the above

Answers:

1) C. Two-phase commit
2) A. Recovery measures
3) D. failure recovery
4) C. Security
5) A. disk errors
6) D. Scalability
7) C. system recovery
8) A. Recovery Manager environment
9) B. Recovery
10) D. stored script
11) B. records
12) B. registration
13) B. Shadow paging
14) B. Recovery Manager
15) D. RAID
16) A. image copy
17) B. RAID level 2
18)  B. secondary
19) A. to take Backup of the Oracle Database 
20) A. mirroring

5.     A transaction is made to wait until all ________ locks held on the item are released
a)     Compatible
b)    Incompatible
c)     Concurrent
d)    Equivalent
View Answer

Answer: a
Explanation: A transaction is made to wait until all compatible locks held on the item are released. This ensures that no other transaction is concurrently accessing the same item.
6.     State true or false: It is not necessarily desirable for a transaction to unlock a data item immediately after its final access
a)     True
b)    False
View Answer

Answer: a
Explanation: It is not necessarily desirable for a transaction to unlock a data item immediately after its final access because serializability may be violated due to this.

8.     The protocol that indicates when a transaction may lock and unlock each of the data items is called as __________
a)     Locking protocol
b)    Unlocking protocol
c)     Granting protocol
d)    Conflict protocol
View Answer

Answer: a
Explanation: The protocol that indicates when a transaction may lock and unlock each of the data items is called as locking protocol. Locking protocols restrict the number of schedules.
9.     If a transaction Ti may never make progress, then the transaction is said to be ____________
a)     Deadlocked
b)    Starved
c)     Committed
d)    Rolled back
View Answer

A system is in a _______ state if there exists a set of transactions in which every transaction is waiting for another transaction in the set.
a)     Deadlock
b)    Starved
c)     Isolated
d)    None of the mentioned
View Answer

Answer: a
Explanation: A system is in a deadlock state if there exists a set of transactions in which every transaction is waiting for another transaction in the set.

Lock timeouts have which of the following advantages?
a)     Unnecessary rollbacks do not occur
b)    Transactions do not starve
c)     It is easy to implement
d)    All of the mentioned
View Answer

Answer: d
Explanation: In lock timeout method, unnecessary rollbacks do not occur, transactions do not starve and it is also easy to implement and is hence widely used if transactions are short and long waits are likely to be due to deadlocks.

        State true or false: The Thomas write rule has a greater potential concurrency than the timestamp ordering protocol
a)     True
b)    False
View Answer

Answer: a
Explanation: The Thomas write rule has a greater potential concurrency than the timestamp ordering protocol. This is because it is a modified version of the timestamp ordering protocol in which obsolete write operations can be ignored under certain circumstances.
8.     Which of the following timestamp based protocols generates serializable schedules?
a)     Thomas write rule
b)    Timestamp ordering protocol
c)     Validation protocol
d)    None of the mentioned
View Answer

Answer: a
Explanation: Thomas write rule protocol generates serializable schedules that no other protocol can generate.

Explanation: Suppose that transaction Ti issues read(Q). If TS(Ti ) < W-timestamp(Q), then Ti needs to read a value of Q that was already overwritten. Hence, the read operation is rejected, and Ti is rolled back.
10.  In timestamp ordering protocol, suppose that the transaction Ti issues write(Q) and TS(Ti)<W-timestamp(Q), then
a)     Read operation is executed
b)    Read operation is rejected
c)     Write operation is executed
d)    Write operation is rejected
View Answer

Answer: d
Explanation: In timestamp ordering protocol, suppose that the transaction Ti issues write(Q) and TS(Ti)<W-timestamp(Q), then the value of Q that Ti is producing was needed previously, and the system assumed that the value would never be produced. Hence the system rejects the write(Q) operation and t

5.     Read only operations omit the _______ phase
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: c
Explanation: Read only operations do not allow write operation to be performed on them. So, they omit the write phase but execute the read and validation phases.
6.     Which of the following timestamp is used to record the time at which the transaction started execution?
a)     Start(i)
b)    Validation(i)
c)     Finish(i)
d)    Write(i)
View Answer

Answer: a
Explanation: There are three different timestamps for each transaction start(i), validation(i), finish(i). Start(i) is used to record the time at which the transaction execution started.

8) The .......... consists of the various applications and database that play a role in a backup and recovery strategy.

A. Recovery Manager environment

B. Recovery Manager suit

C. Recovery Manager file

D. Recovery Manager database


1.    MCQ: In the relational model, the row of the table is known to be
A.  Relation
B.   Attribute
C.  Tuple
D.  Entity field
Answer 
2.    MCQ: Relational model eases the job of the programmer, compared to earlier data models such as
A.  Network model
B.   Hierarchical model
C.   Semistructured model
D.  Both A and B
Answer 
3.    MCQ: To refer to a specific instance of a relation in the relational model, the term used is known as
A.  Relation instance
B.   Relation entity
C.   Relation tuple
D.  Relation attribute
Answer 
4.    MCQ: A property of the entire relation, rather than of the individual tuples, is known as
A.  Attribute
B.   Constant
C.   Variable
D.  Key
Answer 
Answer 
Answer 
5.    MCQ: Minimal superkeys are called
A.  Unique key
B.   Superset key
C.  Candidate key
D.  Primary key
Answer 
6.    MCQ: A table is a collection of relationships, there is a close correspondence between the concept of
A.  Tables and instances
B.   Tables and Entries
C.   Table and variables
D.  Tables and relations
Answer 
7.    MCQ: The term that says values appearing in specified attributes of any tuple in the referencing relation also appear in specified attributes of at least one tuple in the referenced relation, is called
A.  Constant Integrity constraint
B.   Variable Integrity constraint
C.  Referential Integrity constraint
D.  Attribute Integrity constraint
Answer 
8.    MCQ: A relation, say r1, may include among its attributes the primary key of another relation, say r2. the r1 is also known as
A.  Parent relation
B.   Referenced relation
C.  Referencing relation
D.  Node relation

9.    MCQ: In the relational model, the column of the table is known to be
A.  Entity field
B.  Attribute
C.   Tuple
D.  Relation
a.    Answer 
10.                MCQ: The contents of a relation instance may change with time as the relation
A.  Domain
B.   Time
C.  Updated
D.  Retrieved
Answer 
11.                MCQ: The query languages are usually on a level higher than that of a standard
A.  Updation language
B.   Query program language
C.   Procedural language
D.  Programming language
Answer 
12.                MCQ: Query languages used in practice includes
A.  Elements
B.   Fields
C.   Instances
D.  Tuples
Answer 
13.                MCQ: A set of one or more attributes that collectively, allow us to identify uniquely a tuple in the relation, is known as
A.  Unique key
B.   Special key
C.  Super key
D.  Primary key

14.                MCQ: A relation schema consists of a list of attributes and their corresponding
A.  Variables
B.   Instances
C.  Domains
D.  Tuples
Answer 
15.                MCQ: A row in a table represents a relationship among a
A.  Procedures
B.  Set of values
C.   Sequence of values
D.  Entities
Answer 
16.                MCQ: The logical design of the database, is known to be
A.  Database instance
B.   Database entity
C.   Database relation
D.  Database Schema
Answer 
17.                MCQ: The type of query in which user describes the desired information without giving a specific procedure for obtaining that information, is known to be
A.  Procedural language
B.  Nonprocedural language
C.   Programming language
D.  Query program

18.                MCQ: The address field of a person should not be part of the primary key, since it is likely to
A.  Dependent
B.  Changed
C.   Not changed
D.  Too long
19.                MCQ: The primary key should be chosen such that its attribute values are
A.  Updated
B.   Dependent
C.   Changed
D.  Never changed
20.                MCQ: The user instructs the system to perform a sequence of operations on the database to compute the desired outcome, is known as
A.  Programming language
B.   Query program
C.  Procedural language
D.  Nonprocedural language
Answer 
21.                MCQ: The relational model is today the primary data model for commercial
A.  Data management applications
B.   Data storage applications
C.  Data processing applications
D.  Data program application
Answer 
22.                MCQ: The query language is a language in which a user
A.  Requests
B.   Response
C.   Stores
D.  Represents
Answer 
23.                MCQ: A snapshot of the data in the database at a given instant in time, is known as
A.  Database entity
B.   Database relation
C.  Database instance
D.  Database Schema
Answer
24.                MCQ: We are often interested in superkeys for which no proper subset is a
A.  Superset key
B.  Superkey
C.   Primary key
D.  Unique key

U

1. Which of the following statements is true about implicit cursors?

A. Implicit cursors are used for SQL statements that are not named.
B. Developers should use implicit cursors with great care.
C. Implicit cursors are used in cursor for loops to handle data processing.
D. Implicit cursors are no longer a feature in Oracle.
Ans: A

2. Which of the following is not a feature of a cursor FOR loop?

A. Record type declaration.
B. Opening and parsing of SQL statements.
C. Fetches records from cursor.
D. Requires exit condition to be defined.
Ans:B

3. A developer would like to use referential datatype declaration on a variable. The variable name is EMPLOYEE_LASTNAME, and the corresponding table and column is EMPLOYEE, and LNAME, respectively. How would the developer define this variable using referential datatypes?

A. Use employee.lname%type.
B. Use employee.lname%rowtype.
C. Look up datatype for EMPLOYEE column on LASTNAME table and use that.
D. Declare it to be type LONG.
Ans: A

4. Which three of the following are implicit cursor attributes?

A. %found
B. %too_many_rows
C. %notfound
D. %rowcount
E. %rowtype
Ans:C

5. If left out, which of the following would cause an infinite loop to occur in a simple loop?

A. LOOP
B. END LOOP
C. IF-THEN
D. EXIT
Ans:B

6. Which line in the following statement will produce an error?

A. cursor action_cursor is
B. select name, rate, action
C. into action_record
D. from action_table;
E. There are no errors in this statement.
Ans:C

7. The command used to open a CURSOR FOR loop is

A. open
B. fetch
C. parse
D. None, cursor for loops handle cursor opening implicitly.
Ans:D

8. What happens when rows are found using a FETCH statement

A. It causes the cursor to close
B. It causes the cursor to open
C. It loads the current row values into variables
D. It creates the variables to hold the current row values
Ans: B

9. What is the maximum number of handlers processed before the PL/SQL block is exited when an exception occurs?

A. Only one
B. All that apply
C. All referenced
D. None
Ans: A

10. For which trigger timing can you reference the NEW and OLD qualifiers?

A. Statement and Row
B. Statement only
C. Row only
D. Oracle Forms trigger
Ans: D

11. Which identifier is valid?

   A. customer_12
   B. loop
   C. customer@orgA
   D. 12customer
  Ans: A

12. What is the value of customer_id within the nested block in the example below?

/* Start main block */
DECLARE
 customer_id NUMBER(9) := 678;
 credit_limit NUMBER(10,2) := 10000;
BEGIN
 /* Start nested block */
DECLARE
 customer_id VARCHAR2(9) := 'AP56';
 current_balance NUMBER(10,2) := 467.87;
BEGIN
-- what is the value of customer_id at this point?
  NULL;
 END;
END;
Please select the best answer.
   A. 678
   B. 10000
   C. 'AP56'
   D. 467.87
  Ans: B.

13. For which task is it best to use a character string enclosed by double quotes? Please select the best answer.

   A. Referring to a column in the database
   B. Using a reserved word to declare an identifier
   C. Using a hyphen to concatenate two columns
   D. Referring to a number variable by using a logical operator
  Ans: B.

14. What is the maximum number of exception handlers processed before the PL/SQL block is exited, provided an exception occurs? Please select the best answer.

   A. None
   B. All exceptions that are referenced in the block
   C. One
   D. All exceptions that apply
  Ans: C.

15. Which functions can be used with any datatype? Please select all the correct answers.

   A. SUM
   B. MIN
   C. MAX
   D. AVG
  The correct answers are B and C.

16.  Select incorrect variable declarations

A. foo_number varchar2(10);
B. foo_text number(10);
C. foo_char char(1) := 'Y';
D. foo_time date;
E. foo_text varchar2(10) := 'hello world';
Ans:  E

17. Select invalid variable types

A. CHAR
B. VARCHAR1
C. VARCHAR2
D. INTEGER
E. NUMBER
ANS: B

18. List the correct sequence of commands to process a set of records when using explicit cursors

A. INITIALIZE, GET, CLOSE
B. CURSOR, GET, FETCH, CLOSE
C. OPEN, FETCH, CLOSE
D. CURSOR, FETCH, CLOSE
E. GET, SEEK, HIDE
ANS:   C

 

19. Select incorrect variable declarations

A. foo_number varchar2(10);
B. foo_text number(10);
C. foo_char char(1) := 'Y';
D. foo_time date;
E. foo_text varchar2(10) := 'hello world';
Ans:  E

20. Select invalid variable types

A. CHAR
B. VARCHAR1
C. VARCHAR2
D. INTEGER
E. NUMBER
ANS: B
 --------------------------------

21.  List the correct sequence of commands to process a set of records when using explicit cursors

A. INITIALIZE, GET, CLOSE
B. CURSOR, GET, FETCH, CLOSE
C. OPEN, FETCH, CLOSE
D. CURSOR, FETCH, CLOSE
E. GET, SEEK, HIDE
 ANS:   C

22. Where do you declare an explicit cursor in the PL/SQL language?

  A. In the PL/SQL working storage section
  B. In the PL/SQL declaration section
  C. In the PL/SQL body section
  D. In the PL/SQL exception section
  E. None of the above
ANS: B
    

23.  

    

24.  The || is is an example of what function

SELECT last_name || ', ' || first_name || ' ' || middle_name

FROM employees;

  A. Incantination
  B. Integration
  C. Continuation
  D. Concatenation
  E. None of the above
ANS: D    

25.  Which of the following is not an Oracle DML function?

  A. DECODE
  B. TRUNCATE
  C. TO_CHAR
  D. NVL
  E. Trick question, all of these are Oracle DML functio
ANS: B

26.  


27.  Select the best answer.  Which listed attribute is an invalid attribute of an Explicit cursor.

  A. %NOTFOUND
  B. %FOUND
  C. %ROWCOUNT
  D. %ISOPEN
  E. None of the above. All of these are valid.
ANS: E

28.  Which of the following is not a grouping function.

  A. COUNT
  B. SUM
  C. DISTINCT
  D. MIN
  E. All of the above.
ANS: C

29.  


 


31.  Select the best answer below.  What are the components of a package?

  A. Box, wrapping and binding
  B. Header and body
  C. Specification and content
  D. Specification and body
  E. None of the above
ANS: D
    

37. If you don't specify a mode for a parameter, what is the default mode? 

a.OUT
b.IN
c.COPY
d.DEFAULT
e.R(ead)
ANS: B


39. What are the three parameter modes for procedures? 

a.IN, OUT, IN OUT
b.R(ead), W(rite), A(ppend)
c.CONSTANT, VARIABLE, DEFAULT
d.COPY, NOCOPY, REF
ANS: A

 41. What is the correct syntax to create procedure MYPROC that accepts two number parameters X and Y? 

a.CREATE PROCEDURE myproc (x NUMBER, y NUMBER) IS ...
b.CREATE PROCEDURE (x NUMBER, y NUMBER) myproc IS ...
c.CREATE PROCEDURE myproc IS (x NUMBER, y NUMBER) ...
d.CREATE PROCEDURE IS myproc (x NUMBER, y NUMBER) ...
ANS: A
----------------------------------------------------------

40. Which one of the following statements about formal and actual parameters is true? 

a.Formal and actual parameters must have the same name.
b.Formal and actual parameters must have different names.
c.A formal parameter is declared within the called procedure, while an actual parameter is declared in thecalling environment.
d.An actual parameter is declared within the called procedure.
ANS: C



42. In the context of MS SQL SERVER, with the exception of ............ column(s), any column can participate in the GROUP BY clause.

A) bit
B) text
C) ntext
D) image
E) All of above
ANS: E

 32. PL/SQL subprograms, unlike anonymous blocks, are compiled each time they are executed. True or False?

a. True
b.False
ANS: A

38. Which kind of parameters cannot have a DEFAULT value? 

a.OUT
b.IN
c.CONSTANT
d.R(ead)
e.W(rite)
ANS: A

 

33. Subprograms and anonymous blocks can be called by other applications. True or False?

            a.True
           b.False
ANS: A

 Select the invalid PL/SQL looping construct.

  A. WHILE LOOP
                ...
                END LOOP;
  B. FOR rec IN some_cursor LOOP
                ...
                END LOOP;
  C. LOOP
                ...
                UNTIL ;
                END LOOP;
  D. LOOP
                ...
                EXIT WHEN ;
                END LOOP;
  E. None of the above. All are valid.
ANS: C.D

34. A nested subprogram can be called from the main procedure or from the calling environment. Trueor False? 

        a.  True
         b. False
ANS: B

Which of the following is not a valid Oracle PL/SQL exception.

  A. NO_DATA_FOUND ORA-01403
  B. TWO_MANY_ROWS ORA-01422
  C. DUP_VAL_ON_INDEX ORA-00001
  D. OTHERS
  E. None of the above. These are all valid.
ANS: B

 Assuming the date and time is 09/09/2009 09:09:09, what value will the following statement return SELECT TO_CHAR(TRUNC(SYSDATE),'MM/DD/YYYY HH24:MI:SS')  FROM dual;

  A. 09/09/2009 09:09:09
  B. 09/09/2009 09:09:09AM
  C. 09/09/2009
  D. 09/09/2009 00:00:00
  E. None of the above 
ANS: D

35. When modifying procedure code, the procedure must be re-executed to validate and store it in the database. True or False? 

    a. True
    b. False
ANS: A

36. Which of the following can be used as an argument for a procedure parameter? 

a.The name of a variable.
b.A literal value.
c.An expression.
d.All of the above.
e.None of the above
ANS: D


43. The sequence of the columns in a GROUP BY clause has no effect in the ordering of the output.

A) True
B) False
ANS: B

44. You want all dates when any employee was hired. Multiple employees were hired on the same date and you want to see the date only once. 

Query - 1
Select distinct hiredate
From hr.employee
Order by hiredate;
Query - 2
Select hiredate
From hr.employees
Group by hiredate
Order by hiredate;
Which of the above query is valid?
A) Query - 1
B) Query - 2
C) Both
ANS: C

45. GROUP BY ALL generates all possible groups - even those that do not meet the query's search criteria. 

A) True
B) False
ANS: A

46. All aggregate functions ignore NULLs except for ............ 

A) Distinct
B) Count (*)
C) Average()
D) None of above
ANS: B

47. Using GROUP BY ............ has the effect of removing duplicates from the data. 

A) with aggregates
B) with order by
C) without order by
D) without aggregates
ANS: D

48. Below query is run in SQL Server 2012, is this query valid or invalid: 

Select count(*) as X
from Table_Name
Group by ()
A) Valid
B) Invalid
ANS: A

49. For the purposes of ............, null values are considered equal to other nulls and are grouped together into a single result row. 

A) Having
B) Group By
C) Both of above
D) None of above
ANS: B

50. If you SELECT attributes and use an aggregate function, you must GROUP BY the non-aggregate attributes.

A) True
B) False
ANS: A

1.     Collections of operations that form a single logical unit of work are called __________
a)     Views
b)     Networks
c)     Units
d)     Transactions
View Answer

Answer: d
Explanation: Collections of operations that form a single logical unit of work are called transactions. A database system must ensure proper execution of transactions.
2.     The “all-or-none” property is commonly referred to as _________
a)     Isolation
b)     Durability
c)     Atomicity
d)     None of the mentioned
View Answer

Answer: c
Explanation: The all or none policy is commonly referred to as atomicity. It ensures that a work is either completed or not completed and there are no intermediate stages.
3.     Which of the following is a property of transactions?
a)     Atomicity
b)     Durability
c)     Isolation
d)     All of the mentioned
View Answer

Answer: d
Explanation: Atomicity, Durability and Isolation are all properties of transactions.
4.     Execution of translation in isolation preserves the _________ of a database
a)     Atomicity
b)     Consistency
c)     Durability
d)     All of the mentioned
View Answer

Answer: b
Explanation: Execution of translation in isolation preserves the consistency of a database. It ensures that no other transaction is running concurrently.
5.     Which of the following is not a property of a transaction?
a)     Atomicity
b)     Simplicity
c)     Isolation
d)     Durability
View Answer

Answer: b
Explanation: Simplicity is not a property of a transaction. Atomicity, Isolation, Durability are all parts of ACID properties.
6.     Which of the following systems is responsible for ensuring durability?
a)     Recovery system
b)     Atomic system
c)     Concurrency control system
d)     Compiler system
View Answer

Answer: a
Explanation: The recovery system is responsible for the maintenance of durability. In addition, it also ensures atomicity.
7.     Which of the following systems is responsible for ensuring isolation?
a)     Recovery system
b)     Atomic system
c)     Concurrency control system
d)     Compiler system
View Answer

Answer: c
Explanation: The concurrency control system is responsible for ensuring isolation in a database system.
9.     A transaction that has not been completed successfully is called as _______
a)     Compensating transaction
b)     Aborted transaction
c)     Active transaction
d)     Partially committed transaction
View Answer

Answer: b
Explanation: Aborted transaction is a state after the transaction has been rolled back and the database has been restored to the state prior to the transaction.
10.   Which of the following is not a transaction state?
a)     Active
b)     Partially committed
c)     Failed
d)     Compensated
View Answer

Answer: d
Explanation: Compensated is not a transaction state. But active, partially committed and failed are different states of a transaction.
advertisement

11.   The execution sequences in concurrency control are termed as ________
a)     Serials
b)     Schedules
c)     Organizations
d)     Time tables
View Answer

Answer: b
Explanation: The execution sequences in concurrency control are known as schedules.
12.   The scheme that controls the interaction between executing transactions is called as _____
a)     Concurrency control scheme
b)     Multiprogramming scheme
c)     Serialization scheme
d)     Schedule scheme
View Answer

Answer: a
Explanation: The scheme that controls the interaction between executing transactions is called as concurrency control scheme.

1.     I and J are _________ if they are operations by different transactions on the same data item, and at least one of them is a write operation.
a)     Conflicting
b)    Overwriting
c)     Isolated
d)    Durable
View Answer

Answer: a
Explanation: I and J are conflicting if they are operations by different transactions on the same data item, and at least one of them is a write operation.


2.     If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are
a)     Non conflict equivalent
b)    Equal
c)     Conflict equivalent
d)    Isolation equivalent
View Answer

Answer: c
Explanation: If a schedule S can be transformed into a schedule S’ by a series of swaps of non-conflicting instructions, then S and S’ are conflict equivalent. Not all serial schedules are conflict equivalent to each other.
3.     A schedule is __________ if it is conflict equivalent to a serial schedule.
a)     Conflict serializable
b)    Conflicting
c)     Non serializable
d)    None of the mentioned
View Answer

Answer: a
Explanation: A schedule is conflict serializable if it is conflict equivalent to a serial schedule. The concept of conflict equivalence leads to the concept.

4.     The set of ________ in a precedence graph consists of all the transactions participating in the schedule
a)     Vertices
b)    Edges
c)     Directions
d)    None of the mentioned
View Answer

Answer: a
Explanation: The set of vertices in a precedence graph consists of all the transactions participating in the schedule. Precedence graph is a simple and efficient way of determining conflict serializability of the schedule.
-------------------------------------------------------------------------
5.     A ___________of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph.
a)     Serializability order
b)    Direction graph
c)     Precedence graph
d)    Scheduling scheme
View Answer

Answer: a
Explanation: A Serializability order of the transactions can be obtained by finding a linear order consistent with the partial order of the precedence graph. This process is called as topological sorting.
6.     State true or false: If I = read(Q) and J = read(Q) then the order of I and J does not matter.
a)     True
b)    False
View Answer

Answer: a
Explanation: If I = read(Q) and J = read(Q) then the order of I and J does not matter because both I and J are read operations on the query.

State true or false: Information residing in the volatile storage does not usually survive system crashes
a)     True
b)     False
View Answer

Answer: a

7.     State true or false: If I = read(Q) and J = write(Q) then the order of I and J does not matter.
a)     True
b)    False
View Answer

Answer: b
Explanation: If I = read(Q) and J = write(Q) then the order of I and J matters because both I and J are different operations on the query. The order of execution determines the state of the database that is being read or written.
advertisement



1.     If a transaction has obtained a __________ lock, it can read but cannot write on the item
a)     Shared mode
b)    Exclusive mode
c)     Read only mode
d)    Write only mode
View Answer

Answer: a
Explanation: If a transaction Ti has obtained a shared-mode lock (denoted by S) on item Q, then Ti can read, but cannot write, Q.
2.     If a transaction has obtained a ________ lock, it can both read and write on the item
a)     Shared mode
b)    Exclusive mode
c)     Read only mode
d)    Write only mode
View Answer

Answer: b
Explanation: If a transaction has obtained an exclusive mode lock, then it can both read and write on the item on which it in operating.
3.     A transaction can proceed only after the concurrency control manager ________ the lock to the transaction
a)     Grants
b)    Requests
c)     Allocates
d)    None of the mentioned
View Answer

Answer: a
Explanation: A transaction can proceed only after the concurrency control manager grants the lock to the transaction.
4.     If a transaction can be granted a lock on an item immediately in spite of the presence of another mode, then the two modes are said to be ________
a)     Concurrent
b)    Equivalent
c)     Compatible
d)    Executable
View Answer

Answer: c
Explanation: If a transaction can be granted a lock on an item immediately in spite of the presence of another mode, then the two modes are said to be compatible.
7.     The situation where no transaction can proceed with normal execution is known as ________
a)     Road block
b)    Deadlock
c)     Execution halt
d)    Abortion
View Answer

Answer: b
Explanation: The situation where no transaction can proceed with normal execution is known as a deadlock.

10.  The two phase locking protocol consists which of the following phases?
a)     Growing phase
b)    Shrinking phase
c)     both a,b
d)    None of the mentioned
View Answer

Answer: c
Explanation: The two phased locking protocol consists of the growing phase and the shrinking phase.

1.    
2.     Which of the following is not a method in deadlock handling
a)     Deadlock prevention
b)    Deadlock detection
c)     Deadlock recovery
d)    Deadlock distribution
View Answer

Answer: d
Explanation: Deadlock distribution is not a method in deadlock handling whereas, deadlock prevention is followed by deadlock detection and deadlock recovery.

3.     Deadlocks can be prevented using
a)     Preemption and transaction rollbacks
b)    Wait and die scheme
c)     Wound-wait scheme
d)    All of the mentioned
View Answer

Answer: d
Explanation: Preemption and transaction rollbacks, wait and die scheme, wound wait scheme are all different methods of deadlock prevention.
4.     State true or false: Wait die scheme is a non-preemptive technique
a)     True
b)    False
View Answer

Answer: a
Explanation: The wait-die scheme is a non-preemptive technique. When transaction Ti requests a data item currently held by Tj , Ti is allowed to wait only if it has a timestamp smaller than that of Tj (that is, Ti is older than Tj ). Otherwise, Ti is rolled back (dies).

5.    
6.     The _________ graph describes deadlocks precisely
a)     Wound wait graph
b)    Wait die graph
c)     Wait for graph
d)    None of the mentioned
View Answer

Answer: c
Explanation: The wait for graph describes deadlocks precisely. Existence of a cycle in this graph implies that a deadlock will occur.
7.     How do we generally recover from a deadlock?
a)     By aborting all the transactions
b)    By rolling back all the transactions
c)     By rolling back only a selected number of transactions
d)    None of the mentioned
View Answer

Answer: c
Explanation: We generally recover from deadlocks by rolling back only a selected number of transactions
Advertisement

8.     State true or false: Partial rollback is not possible.
a)     True
b)    False
View Answer

Answer: b
Explanation: Partial rollback is possible but it requires the system too maintain an additional amount of information on the states of the transactions.
9.     Which of the following steps must be taken while choosing a victim?
a)     Avoiding starvation
b)    Number of transactions involved in rollback
c)     Data items used by the transaction
d)    All of the mentioned
View Answer

Answer: d
Explanation: While choosing a victim we much choose the one with a minimum cost. That is the one which avoids starvation, the one with the least number of transaction involved in the rollback and the one with the least amount of data items used.

7.
9.     In timestamp ordering protocol, suppose that the transaction Ti issues read(Q) and TS(Ti)<W-timestamp(Q), then
a)     Read operation is executed
b)    Read operation is rejected
c)     Write operation is executed
d)    Write operation is rejected
View Answer

Answer: b
1.     The _________ requires each transaction executes in two or three different phases in its lifetime
a)     Validation protocol
b)    Timestamp protocol
c)     Deadlock protocol
d)    View protocol
View Answer

Answer: a
Explanation: The validation protocol requires each transaction to execute in two or three different phases in its lifetime depending on whether it is a read only or an update transaction.
2.     During __________ phase, the system reads data and stores them in variables local to the transaction.
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: a
Explanation: During the read phase, the system reads data and stores them in variables local to the transaction. It performs all write operations on temporary local variables without updates on the actual database.
3.     During the _________ phase the validation test is applied to the transaction
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: b
Explanation: During the validation phase, the validation test is applied to the transaction. This determines whether the transaction is allowed to proceed or not without causing a violation of serializability.
4.     During the _______ phase, the local variables that hold the write operations are copied to the database
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: c
Explanation: During the write phase, the local variables that hold the write operations are copied to the database. Read only operations omit this phase.

1) Which of the following is not a recovery technique?

A. Deferred update
B. Immediate update
C. Two-phase commit
D. Recovery management


2)Checkpoints are a part of

A. Recovery measures

B. Security measures

C. Concurrency measures

D. Authorization measures


3) ....... deals with soft errors, such as power failures.

A. system recovery

B. media recovery

C. database recovery

D. failure recovery


4) ........... is an essential part of any backup system.

A. Filter

B. Recovery

C. Security

D. Scalability


5) Media recovery deals with ...........

A. disk errors

B. hard errors

C. system errors

D. power failures


6) For a backup/restore system, ............. is a prerequisite for service in a enterprise.

A. Filter

B. Recovery

C. Security

D. Scalability


7) Failure recovery and media recovery fall under ........

A. transaction recovery

B. database recovery

C. system recovery

D. value recovery




9) In which the database can be restored up to the last consistent state after the system failure?

A. Backup

B. Recovery

C. Both

D. None






11) In log based recovery, the log is sequence of .........

A. filter

B. records

C. blocks

E.      numbers



13) .......... is an alternative of log based recovery.

A. Disk recovery

B. Shadow paging

C. Dish shadowing

D. Crash recovery
-------------------------------------------------------------------------------------------------------------------

10) A ........... is a block of Recovery Manager(RMAN)job commands that is stored in the recovery catalogue.

A. recovery procedure

B. recovery block

C. stored block

D. stored script

12) The enrolling of a database in a recovery catalogue is called .........

A. set up

B. registration

C. start up

D. enrolment






14) Most backup and recovery commands in ........... are executed by server sessions.

A. Backup Manager

B. Recovery Manager

C. Backup and Recovery Manager

D. Database Manager


15) ........ systems typically allows to replace failed disks without stopping access to the system.

A. RAM

B. RMAN

C. RAD

D. RAID



16) An ......... is an exact copy of a single datafile, archived redo log file, or control file.

A. image copy

B. datafile copy

C. copy log

D. control copy



17) .......... known as memory-style error correcting-code(ECC) organization, employs parity bits.

A. RAID level 1

B. RAID level 2

C. RAID level 3

D. RAID level 4



18) The remote backup site is sometimes called the .......... site.

A. primary

B. secondary

C. ternary

D. None of the above



19) EXP command is used ...........

A. to take Backup of the Oracle Database

B. to import data from the exported dump file

C. to create Rollback segments

D. to create Schedule.



20) The simplest approach to introducing redundancy is to duplicate every disk is called .....

A. mirroring

B. imaging

C. copying

D. All of the above

Answers:

1) C. Two-phase commit
2) A. Recovery measures
3) D. failure recovery
4) C. Security
5) A. disk errors
6) D. Scalability
7) C. system recovery
8) A. Recovery Manager environment
9) B. Recovery
10) D. stored script
11) B. records
12) B. registration
13) B. Shadow paging
14) B. Recovery Manager
15) D. RAID
16) A. image copy
17) B. RAID level 2
18)  B. secondary
19) A. to take Backup of the Oracle Database 
20) A. mirroring

5.     A transaction is made to wait until all ________ locks held on the item are released
a)     Compatible
b)    Incompatible
c)     Concurrent
d)    Equivalent
View Answer

Answer: a
Explanation: A transaction is made to wait until all compatible locks held on the item are released. This ensures that no other transaction is concurrently accessing the same item.
6.     State true or false: It is not necessarily desirable for a transaction to unlock a data item immediately after its final access
a)     True
b)    False
View Answer

Answer: a
Explanation: It is not necessarily desirable for a transaction to unlock a data item immediately after its final access because serializability may be violated due to this.

8.     The protocol that indicates when a transaction may lock and unlock each of the data items is called as __________
a)     Locking protocol
b)    Unlocking protocol
c)     Granting protocol
d)    Conflict protocol
View Answer

Answer: a
Explanation: The protocol that indicates when a transaction may lock and unlock each of the data items is called as locking protocol. Locking protocols restrict the number of schedules.
9.     If a transaction Ti may never make progress, then the transaction is said to be ____________
a)     Deadlocked
b)    Starved
c)     Committed
d)    Rolled back
View Answer

A system is in a _______ state if there exists a set of transactions in which every transaction is waiting for another transaction in the set.
a)     Deadlock
b)    Starved
c)     Isolated
d)    None of the mentioned
View Answer

Answer: a
Explanation: A system is in a deadlock state if there exists a set of transactions in which every transaction is waiting for another transaction in the set.

Lock timeouts have which of the following advantages?
a)     Unnecessary rollbacks do not occur
b)    Transactions do not starve
c)     It is easy to implement
d)    All of the mentioned
View Answer

Answer: d
Explanation: In lock timeout method, unnecessary rollbacks do not occur, transactions do not starve and it is also easy to implement and is hence widely used if transactions are short and long waits are likely to be due to deadlocks.

        State true or false: The Thomas write rule has a greater potential concurrency than the timestamp ordering protocol
a)     True
b)    False
View Answer

Answer: a
Explanation: The Thomas write rule has a greater potential concurrency than the timestamp ordering protocol. This is because it is a modified version of the timestamp ordering protocol in which obsolete write operations can be ignored under certain circumstances.
8.     Which of the following timestamp based protocols generates serializable schedules?
a)     Thomas write rule
b)    Timestamp ordering protocol
c)     Validation protocol
d)    None of the mentioned
View Answer

Answer: a
Explanation: Thomas write rule protocol generates serializable schedules that no other protocol can generate.

Explanation: Suppose that transaction Ti issues read(Q). If TS(Ti ) < W-timestamp(Q), then Ti needs to read a value of Q that was already overwritten. Hence, the read operation is rejected, and Ti is rolled back.
10.  In timestamp ordering protocol, suppose that the transaction Ti issues write(Q) and TS(Ti)<W-timestamp(Q), then
a)     Read operation is executed
b)    Read operation is rejected
c)     Write operation is executed
d)    Write operation is rejected
View Answer

Answer: d
Explanation: In timestamp ordering protocol, suppose that the transaction Ti issues write(Q) and TS(Ti)<W-timestamp(Q), then the value of Q that Ti is producing was needed previously, and the system assumed that the value would never be produced. Hence the system rejects the write(Q) operation and t

5.     Read only operations omit the _______ phase
a)     Read phase
b)    Validation phase
c)     Write phase
d)    None of the mentioned
View Answer

Answer: c
Explanation: Read only operations do not allow write operation to be performed on them. So, they omit the write phase but execute the read and validation phases.
6.     Which of the following timestamp is used to record the time at which the transaction started execution?
a)     Start(i)
b)    Validation(i)
c)     Finish(i)
d)    Write(i)
View Answer

Answer: a
Explanation: There are three different timestamps for each transaction start(i), validation(i), finish(i). Start(i) is used to record the time at which the transaction execution started.

8) The .......... consists of the various applications and database that play a role in a backup and recovery strategy.

A. Recovery Manager environment

B. Recovery Manager suit

C. Recovery Manager file

D. Recovery Manager database



No comments:

Post a Comment