Technical Interview Questions

DBMS Interview Questions-DBMS Advanced

|   16230

1. What do you mean by UNDO in database? 

A. UNDO is a table in database 
B. UNDO is used to restore the database to the point before the last operation 
C. Both (A) & (B) 
D. None of the above 
Answer: A 

UNDO is a table in database where all the DML transactions are stored in opposite way. For example if user does an ‘ INSERT’ transaction on any table, an opposite transaction i.e., ‘DELETE’ transaction is entered into UNDO table. This is done because if user decides to undo a transaction, whatever is stored in UNDO is fired. In this case, ‘ DELETE’ is fired on the same table. So that the row which was inserted before gets deleted now leaving table unaltered. This may look like typical undo in our text editors but in Database, this is also a DML transaction which gets executed on the table. 

User Transaction : insert into table employee (, “Joe”, ‘M’, ‘California’); 
This transaction will insert the row into table and will return a row id of that row. 
Now the following transaction is added to UNDO table. 
delete from employee where rowid = <row_id_returned_by_insert>; 


2.How is data in database stored? 

A. Tables 
B. Binary Data 
C. Files 
D. Data in Tables & Metadata in Files 
Answer: C 


3. In a client-server database architecture, syntax checking is done at ? 

A. Client 
B. Server 
C. Both Client and Server 
D. Client or Server 

If the client is database-intelligent client, Syntax checking is done at client side or else syntax checking is done at server side. 


4. What is “DATA FILE” used for in database

A. To store data. 
B. To store metadata 
C. To store system information 
D. None of the above 
Answer: A 


5. Which of the following is true? 

A. Functions & Procedures are one and the same. 
B. Package is a collection of Functions and Procedures 
C. Function returns a value while a Procedure doesn’t. 
Answer: All of the above 

Iostat reports on terminal, disk and tape I/O activity. 
Vmstat reports on virtual memory statistics for processes, disk, tape and CPU activity. 
Netstat reports on the contents of network data structures.