DBMS Interview Questions - Set 4

DBMS Interview Questions

This page consists of DBMS interview questions and answers.

Q1: What is the use of GRANT and REVOKE command?

The GRANT and REVOKE both are Data Control Language - DCL commands.

GRANT command is used to grant permission to a user to perform specific tasks.

The opposite of GRANT is REVOKE and it is used to remove permission from a user to perform specific tasks.

Q2: What are the three levels of data abstractions in database?

Three level of data abstractions are listed below.

  • Physical level
  • Logical level
  • View level

Q3: Describe the Physical level of data abstraction in database

The physical level is the lowest level of data abstraction in database. This level describes how the data is actually stored in and complex data structures involved.

For example if we are storing customer information then at the physical level the data will be in blocks of memory stored in different part of the actual hard disk of a server or localhost computer.

The granular details of this level is generally hidden from the developer who is working with the database.

Q4: Describe the Logical level of data abstraction in database?

The logical level is the middle level of abstraction. It describes the data that is stored in the database.

For example if we are storing customer information then at the logical level we will be dealing with the data being stored. The relationships that exists between them. The tables involved and the columns required to store the data.

Developers generally work at this level.

Q5: Describe the View level of data abstraction in database?

The View level is the highest level of data abstraction in the database. This level describes the user interaction with the database.

For example if we are working with a database that stores customer information then at the view level the users will be provided with GUI to interact with the database.

At this level the user gets to access the data and may also be allowed to insert new data. But the user will not get to know how and what data are saved in the database. These complex details are generally hidden from the end users.

Q6: What is ACID property in database?

ACID stands for Atomicity, Consistency, Isolation, and Durability . These properties provides a safe way of data sharing among users.

Q7: Explain Atomicity of ACID property

This property is based on the concept of "Either All or Nothing".

So, this property means that if an update occurs inside the database then that update is either available to all beyond users and application program. Or, it is not available to anyone.

So, any database transaction is either fully committed or completedly aborted. And there is no room for partial commits. So, if a transaction fails then all changes are aborted.

Q8: Exaplain Consistency of ACID property?

This property ensures that consistency is maintained in the database before and after a transaction.

Q9: Explain Isolation of ACID property?

Isolation property ensures that multiple transactions can occur concurrently and without giving rise to data inconsitence in the database.

Q10: Explain Durability of ACID property?

The Durability property ensures that the data is always available after successful commit event after system restart or failure.