DBMS Interview Questions - Answers

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 3

DBMS Interview Questions and Answers

1. What is DBMS used for?


DBMS or Database Management System is an application software whose
main purpose is to resolve data. This system allows us to store, retrieve,
define and manage in a database.

2. What is meant by a Database?


A database is an organized collection of data which is usually managed by a
DBMS.

3. Why is the use of DBMS recommended? Explain by listing some of its


major advantages?
Some of the major advantages of using dbms are:
1. Controlled redundancy
2. Data sharing
3. Data backup and recovery
4. Enforcement of integrity constraints
5. Independence of data

4. What is the purpose of normalization in DBMS?


The purpose of normalization in dbms is to minimize redundancy and ensure
that only related data is stored in each table.

5. What are the different types of languages that are available in DBMS?
The different types of dbms languages are:
DDL: Data Definition language is used to define schemas, table, index, view
etc. (create, alter, drop, rename, truncate)
DML: Data Manipulation Language is used to manipulate data in dbms
tables. (select, insert, update, delete)
DCL: Data control language is used to grant and revoke user access in the
database. (grant, revoke)
TCL: Transaction Control language is used to either perform or rollback the
changes we make in a database using DML. (commit, rollback)

6. What is the purpose of SQL?


SQL is used to communicate with databases. It is the standard language for
relational databases. Using sql we can create a database, table, update,
delete, retrieve etc.

7. Explain the concept of primary and foreign keys.


In relational databases table primary key is used to ensure data in a specific
column is unique.
A foreign key is a column or a group of columns in a relational database table
that provides a link between two tables. It refers to a field in a table which is a
primary key in another table.

8. What are the main differences between Primary key and Unique key?
A relational database table can have only one primary key whereas there can
have multiple unique keys and a primary key cannot be null but a unique key
can be null.

9. What is the concept of sub-query in terms of SQL?


A subquery is simply a SQL query within another query, we can say it’s an
inner or nested query.

10. What is the use of DROP commands and what are the differences
between DROP, TRUNCATE and DELETE commands?
The DROP command is used to delete a database, table, index or view from
the database.
TRUNCATE is used to remove all the rows from a table but the table
structure, constraints, index and so on remain whereas DROP is used to
delete table definition along with data.
DELETE is used to remove or delete a row from a database table.

11. What is the main difference between UNION and UNION ALL?
UNION and UNION ALL are SQL operators used to concatenate two more
data sets. This allows us to write multiple SELECT statements to retrieve
desired results and then combine them together into a final unified set.
The only difference is that UNION ALL keeps all the records from each of the
original sets where UNION removes any duplicate records.

12. Explain the ACID properties in DBMS.


13. What is a correlated subquery in DBMS?
14. Explain Entity, Entity Type and Entity Set in DBMS.
15. What are the different levels of abstraction in DBMS?
16. What integrity rules exist in the DBMS?
17. What is the E-R model?
18. What is a functional dependency in the DBMS?
19. What is 1NF?
20. What is 2NF?
21. What is 3NF?
22. What is BCNF?
23. What is a clause in terms of SQL?
24. How can you get the alternate records from a table?
25. How is pattern matching done in SQL?
26. What is a join in SQL?
27. What are the different types of joins in SQL?
28. What is meant by trigger?
29. What is RDBMS?
30. What are the different types of relationships in the DBMS?

You might also like