DBMS Interview Questions

Are you looking to join an industry as a DBMS developer? Have you prepared yourself to face DBMS interview questions? If not, then dig into some technical insights for DBMS. Database management has become popular more than ever. A set of logically arranged data for a specific purpose is commonly known as Database. A collection of programs, which can be used to create and maintain a database is known as Database Management System or DBMS. It is basically a systematic way of executing a command with data.

If one is through with the basics, half the battle is won. The more the knowledge on the subject, the easier will it be to crack the DBMS interview questions. There is a vast list of questionnaire available on Google to help you gain confidence before facing the interview panel.

Read Best DBMS Interview Questions

#1 What is join? Mention its types.

Join depicts the relationship between two or more tables. It combines row of different tables and enables you to select data with reference to data of some other table. There are several joins in database like CROSS JOINs, NATURAL JOINs, EQUI-JOIN, etc. Two most important joins are –

  • INNER JOIN – this join returns values that have matching record in both the tables. In this, blank rows are combined in middle.
  • OUTER JOIN– it returns all the records of left table. It also returns the values that match with the right table. Blank rows are put in specified side by joining tables in other side.

#2 What is database normalization? Explain types of it.

#3 Differentiate between Nested loop, Hash loop and Merge Join.

Nested loop- A nested loop is a loop within a loop. It is an inner loop within an outer body that allows fewer entries. Individual entries in nested loop is processed individually in the inner loop. Example-

.Select col.*, col2.* from coll, col2 where coll.coll=col2.col2;

The nested way works in following format-

For i in (select*from coll) loop

For j in (select*from col2 where col2 = i.coll) loop

Results are displayed

End of the loop;

End of the loop;

For nested loop, first outer (driving) table is identified. Then inner tavle is assigned to the outer table and every row in inner column is accessible from every row of outer table. Nested loop is executed from hash join, inner loop and then outer loop.

Hash join- it is divided into-

  • Build- this hash table has in-memory which is present on the smaller table.
  • Probe – it is the hash value present in each second row element.
  • Sort merge element- it joins two independent sources of data.

It is considered a better option as compared with nested loop when data volume is big. The full operation of hash join can be classified as-

Sort join operation-

Get first row R1 from input1

Get first row R2 from input2

Merge join operation- 'while' command is not used at loop's end.

If R1 joins with R2

Next row is got R2 from the input2

Return  (R1,R2)

else if R1 ,style="". Next row is got from R1 from



next row is got from R2 from input 2

end of the loop.

#4 Mention some advantages of using DBMS.

DBMS is a structure that manages and handles large volumes of data stored in database. it serves as an intermediate between users and the database. Following are few advantages of database management system-
  • Data redundancy- this happens when multiple copies of data is stored. With DBMS, data is stored in one structure database and the data is inputted only once.
  • No unauthorized access- it discourages unauthorized access and improves data access.
  • Supports multiple user interfaces.
  • Minimized data inconsistency- In DBMS, data inconsistency is reduced as different versions of same data doesn’t appear in different places.

#5 State some commands of DDL?

DDL commands are used to modify and edit the structure of a database system. Some of the important commands are-
  1. CREATE table command- It defines each column of the table in a unique and distinct manner like name, data type, size, etc.

    Syntax: CREATE TABLE [column name] ([column definitions]) [table parameters]

  2. ALTER table command- ALTER is used to make changes and edit the existing table of database. Syntax: ALTER objecttype objectname parameters.

  3. DROP table command – DROP is used for destroying a table and all the recorded data in it. It destroys an existing database.  Syntax: DROP objecttype objectname parameters.

#6 What are different relationships existing in database?

A relationship in database is established when one table has a foreign key that references the primary key of another table. There are three relationships existing between database-
  • One-to-one– This simple relationship exists among two tables having same rows or columns.
  • One-to-many– Two tables connected by a foreign key and a primary key enjoys one-to-many relationship.
  • Many-to-many – It is a complex relationship in which many records in one table is connected to many records in another table.

#7 Enlist the types of cursor?

There are two types of Cursor in MSSQL-
  • Implicit cursor– Implicit cursors are automatically created whenever an SQL statement is executed and this happens without the user’s notice.
  • Explicit cursor– Explicit cursors are created with the awareness of users. It handles the SQP/PL query in one row and exercises more control over the context area.

#8 Enlist various types of interactions created by DBMS?

There are various kinds of interactions supported by DBMS like-
  • Data definition
  • Update
  • Retrieval
  • Administration

#9 What is data independence?

Data independence reflects data transparency and specifies that the application is independent of storage structure and access strategy of data. It modifies the schema definition in one level without changing the schema level in the next level. Physical data independence and logical data independence are two types of data independence.

#10 How index hunting contributes in improving the query performance?

Index hunting is viewed as an important part of database management system. It enhances the speed and the query performance of the database. It is done in following ways-
  • In order to coordinate the study of query with workload, query optimizer is used. It also suggests the best use of queries based on the optimizer.
  • Performance of query distribution is checked and monitored to know there effects.
  • Turning complex database into small chunks of queries is also suggested.

#11 What are different cursor types?

A database cursor enables traversal over the records in database. The different cursor types are-
  • Dynamic – it is highly subject to changes while scrolling the cursor in database.
  • Static – it doesn’t show any changes while scrolling. It also works on recording of snapshot.
  • Keyset – it enables the user to modify the data without displaying the new data.

#12 Define Atomicity and Aggregation.

Atomicity: In database management, atomicity is a concept that assures the users of the incomplete transactions. It takes care of these transactions and the actions related to incomplete transactions are left undone in DBMS.

Aggregation: It aggregates the collected entities and their relationships. In this, information is gathered and expressed in summary form.

Also Prepare: Frequently Asked PL/SQL Interview Questions

#13 Define DML and DCL statements?

#14 what are the importance of partitioning?

Database partitioning is the process of splitting large tables into smaller database entities. Following are the benefits of partitioning-
  • When rows are in one partition, query performance in such situations is improved.
  • It also helps to access large parts of single partition.
  • Data which are rarely used can be stored in slower and cheaper storage medium.

#15 What are the features of Database language?

Database language is used to create and store data in computer system. DBMS itself is one of the features of database language which is a software application for management of data. Database language also facilitates modification and alteration of query results by averaging, counting, summing, etc. Database language enables user’s interaction with other applications.
Ask a Question