Last Updated on October 10, 2022 by Gokul Kannan
In this article, we will discuss the most important commonly asked DBMS Interview Questions and Answers in order to make you familiar with the type of questions that can be asked during a job interview related to the Database Management System (DBMS).
Basically, from my personal experience, there is not any specific way or formula to get through an Interview Process and it totally depends on you and the type of Interviewer. But still, it’s good to be prepared for your profile for your own confidence and knowledge so that you don’t feel hesitant to answer the questions asked during an interview.
DBMS Interview Questions And Answers
1. What is DBMS used for?
Answer: DBMS, commonly known as Database Management System, is an application system whose main purpose revolves around the data. This is a system that allows its user to store the data, define it, retrieve it and update the information about the data inside the database.
2. Why is the use of DBMS recommended? Explain by listing some of its major advantages.
Answer: Some of the major advantages of DBMS are as follows:
- Controlled Redundancy: DBMS supports a mechanism to control the redundancy of data inside the database by integrating all the data into a single database and as data is stored in only one place, the duplicity of data does not happen.
- Data Sharing: Sharing of data among multiple users simultaneously can also be done in DBMS as the same database will be shared among all the users and by different application programs.
- Backup and Recovery Facility: DBMS minimizes the pain of creating the backup of data again and again by providing a feature of ‘backup and recovery which automatically creates the data backup and restores the data whenever required.
- Enforcement of Integrity Constraints: Integrity Constraints are very important to be enforced on the data so that the refined data after putting some constraints are stored in the database and this is followed by DBMS.
- Independence of data: It simply means that you can change the structure of the data without affecting the structure of any of the application programs.
3. What is the purpose of SQL?
Answer: SQL stands for Structured Query Language whose main purpose is to interact with the relational databases in the form of inserting and updating/modifying the data in the database.
4. What is concurrency control?
Answer: This is a process of managing simultaneous operations in a database so that database integrity is not compromised. The following are the two approaches involved in concurrency control:
- Optimistic approach – Involves versioning
- Pessimistic approach – Involves locking
5. What is meant by the trigger?
Answer: Trigger is one of the very important codes or programs that get executed automatically in response to the events that occur in a table or a view. For Example, If a new record is inserted in an employee database then the data gets created automatically in the related tables like salary, department, and roles tables
6.How is the pattern matching done in the SQL?
Answer: With the help of the LIKE operator, pattern matching is possible in the SQL.’%’ is used with the LIKE operator when it matches with 0 or more characters, and ‘_’ is used to match one particular character.
SELECT * from Emp WHERE name like ‘b%’;
SELECT * from Emp WHERE name like ‘hans_’;
7. What is 2NF in the DBMS?
Answer: 2NF is the Second Normal Form.
Any table is said to have in the 2NF if it satisfies the following 2 conditions:
A table is in the 1NF.
Each non-prime attribute of a table is said to be functionally dependent in totality on the primary key.
8. What is a CLAUSE in terms of SQL?
Answer: This is used with the SQL queries to fetch specific data as per the requirements on the basis of the conditions that are put in the SQL. This is very helpful in picking the selective records from the complete set of records.
For Example, There is a query that has a WHERE condition or the query with the HAVING clause.
9. What integrity rules exist in the DBMS?
Answer: There are 2 major integrity rules that exist in the DBMS.
- Entity Integrity: This states a very important rule that the value of a Primary key can never have a NULL value.
- Referential Integrity: This rule is related to the Foreign key which states that either the value of a Foreign key is a NULL value or it should be the primary key of any other relation.
10. What is the use of the DROP command and what are the differences between DROP, TRUNCATE and DELETE commands?
Answer: The DROP command is a DDL command which is used to drop/delete the existing table, database, index, or view from the database.
The major difference between DROP, TRUNCATE and DELETE commands are:
DROP and TRUNCATE commands are the DDL commands which are used to delete tables from the database and once the table gets deleted, all the privileges and indexes that are related to the table also get deleted. These 2 operations cannot be rolled back and so should be used only when necessary.
DELETE command, on the other hand, is a DML Command which is also used to delete rows from the table and this can be rolled back.
Note: It is recommended to use the ‘WHERE’ clause along with the DELETE command else the complete table will get deleted from the database.
Also you can prefer this DBMS Interview Questions and Answers article for better understanding, go and check it out!
We tried to discuss DBMS Interview Questions and Answers in this article. We hope this article gives you a better understanding of the type of DBMS Interview Questions and Answers. PrepBytes also provides a good collection of Foundation Courses that can help you enhance your coding skills. Want to make sure you ace the interview in one go? Join our Placement Program which will help you get prepared and land your dream job at MNCs. Mentors of Prepbytes are highly experienced and can provide you with basic, in-depth subject knowledge for better understanding.