Here we provide a basic list of Interview Questions on DBMS. Which will clear your knowledge on DBMS which will help to crack the interview.
Interview Questions on DBMS
1. What is DBMS?
Ans: It is a collection of programs that enables the user to create and maintain a database.
2. What are the advantages of DBMS?
- Redundancy is controlled.
- Unauthorized access is restricted.
- Providing multiple user interfaces.
- Enforcing integrity constraints.
- Providing backup and recovery.
3. What is the disadvantage of a file processing system?
- Data redundancy and inconsistency.
- Difficult in accessing data.
- Data isolation.
- Data integrity.
- Concurrent access is not possible.
- Security Problems.
4. What are the three levels of data abstraction?
Ans: There are three levels of abstraction:
- Physical Level
- Logical Level
- View Level
5. Define the integrity rules?
Ans: There are two integrity rules.
- Entity integrity: This states that the primary key cannot have a NULL value.
- Referential Integrity: States that foreign key can be either a NULL value or should be Primary Key value of other relation.
6. What is Data Independence?
Ans: Data independence means that the application is independent of the storage structure and actress strategy of data.
Two types of data independence:
- Physical Data Independence: Modification in the physical level should not affect the logical level.
- Logical Data Independence: Modification in logical level should affect the view level.
7. What is Data Model?
Ans: A collection of conceptual tools for describing data, data relationships data semantics, and constraints.
8. What is the E-R model?
Ans: The data model is based on the real world that consists of basic object entities and of relationships among these objects. Entities are described in a database by a set of attributes.
9. What is relational schema and a relation?
Ans: A relation Schema denoted by R(A1, A2,…, An) is made up of the relation name R and the list of attributes Ai that it contains. A relation is defined as a set of tuples. Let r be the relation that contains set tuples (t1, t2, t3….., tn). Each tuple is an ordered list of n-values t=(v1,v2,….., vn).
10. What is DDL ( Data Definition Language)?
Ans: A database schema is specified by a set of definitions expressed by a special language called DDL.
11. What is SDL (Storage Definition Language)?
Ans: This language is to specify the internal schema. This language may specify the mapping between two schemas.
12. What is Data Storage – Definition Language?
Ans: The storage structures & access methods used by the database system are specified by a set of definitions in a special type of DDL called data storage-definition language.
13. What is a DML compiler?
Ans: It translates DML statements in a query language into low-level instruction that the query evaluation engine can understand.
14. What is normalization?
Ans: It is a process of analyzing the given relation schemas based on their functional dependencies (FDs) and primary key to achieve the properties.
- Minimizing Redundancy
- Minimizing insertion, deletion, and update anomalies
15. What is a functional dependency?
Ans: A Functional dependency is denoted by X Y between two sets of attributes X and Y that are subsets of R specifies a Constraint on the possible tuple that can form a relation state r or R. The constraints is for any two tuples t1 and t2 in r if t1[X] = t2[X] then they have t1[Y] = t2[Y]. This means the value of the X component of a tuple uniquely determines the value of component Y.
16. What is Indexing and what is a different kind of indexing?
Ans: Indexing is a technique for determining how quickly specific data can be found.
- Binary search style indexing
- B-Tree indexing
- Inverted list indexing
- Memory resident table
- Table Indexing
17. What is meant by query optimization?
Ans: The phase that identifies an efficient execution plan for evaluating a query that has the least estimated cost is referred to as query optimization.
18. What is durability in DBMS?
Ans: Once the DBMS informs the user that a transaction has successfully completed, its effects should persist even if the system crashes before all its changes are reflected on the disk. The property is called durability.
19. What do you mean by a flat-file database?
It is a database in which there are no programs or user access languages. It has no cross-file capabilities but is user-friendly and provides user-interface management.
20. What is Query?
Ans: A query with respect to DBMS relates to the user commands that are used to interacts with a database. The query language can be classified into data definition language and data manipulation language.
21. What do you mean by correlated subquery?
Ans: Subquery, or nested queries, are used to bring back a set of rows to be used by the parent query. Depending on how the subquery is written, it can be executed once for the parent query or it can be executed once for the parent query or it can be executed once for each row returned by the parent query. If the subquery is executed for each row of the parent, this is called a correlated subquery.
22. Are the resulting relation of PRODUCT and JOIN operation the same?
- PRODUCT: Concatenation of every row in one relation with every row in another.
- JOIN: Concatenation of rows from one relation and related rows from another.
23. What is the RDBMS kernel?
Ans: Two important pieces of RDBMS architecture are the kernel, which is the software, and the data dictionary, which consists of the system-level data structure used by the kernel to manage the database you might think of an RDBMS as an operating system, designed specifically for controlling data access; its primary functions are storing, retrieving, and securing data. An RDBMS maintains its own list of authorized users and their associated privileges; manages memory caches and paging; controls locking for concurrent resource usage; dispatched and schedules user requests, and manages space usage within its table-space structures.
24. Name the sub-system of an RDBMS.
- Language Processing
- Process Control
- Storage Management
- Logging and Recovery
- Distribution Control
- Transaction Control
- Memory Management
- Lock Management
25. What is the job of information stored in a data dictionary?
Ans: The information in the data dictionary validates the existence of the objects, provides access to them, and maps the actual physical storage location.
26. Define SQL and state the differences between SQL and other conventional programming Languages.
Ans: SQL is a nonprocedural language that is designed specifically for data access operations on normalized relational database structures. The primary difference between SQL and other conventional programming languages is that SQL statements specify what data operations should be performed rather than how to perform them.
27. Name the three major sets of files on disk that compose a database in Oracle.
Ans: There are three major sets of files on disk that compose a database. All the files are binary. These are
- Database files
- Control files
- Redo logs
The most important of these are the database files where the actual data resides. The control files and the redo logs support the functioning of the architecture itself. All three sets of files must be present, open, and available to Oracle for any data on the database to be usable.
28. What are stored procedures? And what are the advantages of using them?
Ans: Stored procedures are database objects that perform user-defined operations. A stored procedure can have a set of compound SQL statements. A stored procedure executes the SQL commands and returns the result to the client. Stored procedures are used to reduce network traffic.
29. What are the cursors give different types of cursors?
Ans: PL/SQL uses cursors for all database information accesses statements. The language supports the use of two types of cursors.
30. What is a cold backup and hot backup (in the case of Oracle)?
- Cold Backup: It is copying the three sets of files (database files, redo logs, and control files) when the instance is shut down. This is a straight file copy, usually from the disk directly to tape. You must shut down the instance to guarantee a consistent copy. If a cold backup is performed, the only option available in the event of data file loss is restoring all the files from the latest backup. All work performed on the database since the last backup is lost.
- Hot Backup: Some sites (such as worldwide airline reservation systems) cannot shut down the database while making a backup copy of the files. Cold backup is not an available option.
31. What is ERP, and what kind of a database is used in an ERP application?
Ans: Enterprises Resource Planning (ERP) is an information system used in manufacturing companies and includes sales, inventory, production planning, purchasing, and other business functions. An ERP system typically uses a multiuser database.
32. What are the insertion and deletion anomalies?
Ans: A deletion anomaly occurs when, by deleting the facts about one entity, we inadvertently delete facts about another entity; with one deletion, we lose facts about two entities. For example, if we delete the tuple for student 001289 from a table, we may lose not only the fact that student 001289 is in Pierce Hall but also the fact that he has $200 left in his security deposit. An insertion anomaly happens when we encounter the restriction that we cannot insert a fact about one entity until we have an additional fact about another entity.
33. Name four applications for triggers.
- Providing default values
- enforcing data constraints
- Updating Views
- Enforcing referential integrity
34. What are the advantages of using stored procedures?
Ans: The advantages of stored procedures are
- greater security
- decreased network traffic
- The fact that SQL can be optimized
- Codesharing leads to less work, standardized processing, and specialization among developers.
35. What is the coding pattern for using a JDBC driver?
- Load the driver
- Establish a connection to the database
- Create a statements
- Do something with the statements
Read More 15+ Top Interview Questions on DBMS
If you have any doubt related to these interview questions on DBMS…ask me in the comment section. The Source of this article is Placecom.
Also-Read: Top 30+ Interview Questions on SQL for freshers.