RDBMS interview questions and answers


Q1: What Is RDBMS?

Ans: RDBMS (Relational Database Management Systems) are database management systems that store data records and indexes in tables. Relationships may be established and maintained between and among data and tables. Tables are used in relational databases to represent connections between data elements. Interdependence between these tables is indicated using data values rather than pointers. This provides a high level of data independence. An RDBMS can recombine data elements from various files, resulting in sophisticated data usage tools.

Q2: What Is Index?

Ans: An index is a physical structure that contains data references. Indices are added to existing tables to help users find rows more quickly and effectively. An index can be created on one or more columns in a table, and each index is given a name. The indexes are not visible to users; they are only used to speed up queries. Effective indexes are one of the most effective strategies to increase database application performance. When there is no index to aid a query, a table scan occurs. SQL Server analyses every row in the table to fulfill the query results during a table scan. Table scans are occasionally inevitable, but they have a significant influence on performance on big tables. Clustered indexes define the physical sorting of entries in a database table on a storage medium. As a result, each database table may only have one clustered index. Non-clustered indexes are formed outside of the database table and include a sorted list of table references.

Q3: What is normalization? and what explains different normalization forms?

Ans: Database normalization is the process of arranging data to reduce duplication. As a result, data consistency is ensured. Several issues are connected with data redundancy, including disc space waste, data inconsistency, and sluggish DML (Data Manipulation Language) searches. There are several types of normalization: – 1NF, 2NF, 3NF, BCNF, 4NF,5NF, ONF, DKNF.

  • 1NF: –  Each column's data should be atomic number multiple values separated by a comma. There are no repeated column groupings in the table. The main key is used to identify each record uniquely.
  • 2NF: –  The table should satisfy all of 1NF's requirements and transfer duplicate data to a separate table. Furthermore, it establishes a link between these tables by utilizing foreign keys.
  • 3NF: –  All of the requirements of 1NF and 2NF should be met by a 3NF table. 3NF does not have any qualities that are partially reliant on the main key.

Q4: What Is Join Dependency And Inclusion Dependency?

Ans:

    Join Dependency:

    A Join dependence is a broader version of a Multivalued dependency. If R1, R2, R3,..., Rn is a lossless-join decomposition of R, then a JD R1, R2,..., Rn is said to hold over R. There is no comprehensive collection of inference rules for JD.

    Inclusion Dependency:

    A statement of the form "some columns of a relation are contained in other columns" is an Inclusion Dependency. Inclusion dependence is demonstrated via a foreign key restriction.

Q5: What Is Stored Procedure?

Ans: A stored procedure is a named collection of SQL statements that have already been generated and saved in the server database. Stored procedures take input parameters, allowing a single process across the network by several clients with varying input data. When the process is changed, the new version is automatically sent to all customers. Stored processes help to decrease network traffic while also improving performance. Stored procedures can be used to assist ensure the database's integrity.

e.g. sp_helpdb, sp_renamedb, sp_depends etc.