Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
31 views
10 pages
DBMS Interview QA
Uploaded by
jugaljaisingani5
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save DBMS_Interview_QA For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
31 views
10 pages
DBMS Interview QA
Uploaded by
jugaljaisingani5
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save DBMS_Interview_QA For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 10
Search
Fullscreen
DBMS Interview Questions & Answers IMPORTANT QUESTIONS 3-Tiered Architecture IN DBMS ? Gent ‘Agpicaton Server Lose Peto (Stree want one a Soa) 1. What are the differences between a DBMS and RDBMS? 2. Explain the terms database and DBMS. Also, mention the different types of DBMS. 3. What are the advantages of DBMS? 4. Mention the different languages present in DBMS 5. What do you understand by query optimization? 6. Do we consider NULL values the same as that of blank space or zero? 7. What do you understand by aggregation and atomicity? 8. What are the different levels of abstraction in the DBMS? 9. What is an entity-relationship model? 10.What do you understand by the terms Entity, Entity Type, and Entity Set in DBMS? Provides ah Opie Sgaypr reiealna, retifeving, Provides the same as that of DBMS, but it provides and storing from a collection of logically related | oe teary information ‘A software application that interacts with databases, applications, and users to capture and analyze the required data, The data stored in the database can be retrieved, deleted and modified based on the client's requirement The different types of DBMS are as follows: + Relational DBMS (RDBMS): This type of DBMS, uses a structure which allows the users to access data in relation to another piece of data in a database. In this type of DBMS, data is stored in the form of tables. + Hierarchical DBMS: As the name suggests, this type of DBMS has a structure similar to that of a tree, wherein the nodes represent records and the branches of the tree represent fields. Network DBMS: This type of DBMS supports many-to-many relations wherein multiple member+ Object-oriented DBMS: Uses small individual software called object to store pieces of data and the instructions for the actions to be done with the data. DAY -eey mL iy ' —_—. DT Th bie lees Relational Object- eric Ts] The advantages of DBMS are as follows: ‘+ Sharing of Data: Multiple users can use data from the same database simultaneously. Integrity constraints: These constraints allow the data to be stored in a database in a refined manner, + Redundancy control: Supports a mechanism to control the redundancy of data by integrating all the data into @ single database + Data Independence: Allows to change the structure of the data without affecting the structure of any of the running application programs, Provide backup and recovery facility: Provides a feature of ‘backup and recovery’ to automatically create the data backup and restore the data as and when required The different languages present in DBMS are as follows: + DDL(Data Definition Language) — Consists of commands which are used to define the database. + DML(Data Manipulation Language) - Consists of commands which are used to manipulate the data present in the database. + DCL(Data Control Language) - Consists of commands which deal with the user permissions and controls of the database system. « )—Consist of commands which deal with the transaction of the database. Query optimization is the phase that identifies a plan for evaluation query that has the least estimated cost. This phase comes into the picture when there are a lot of algorithms and methods to execute the same task. ‘The advantages of query optimization are as follows: + The output is provided faster + Alarger number of queries can be executed in less time + Reduces time and space complexity ANULL value is not at all same as that of zero or a blank space. The NULL value represents a value which is unavailable, unknown, assigned or not applicable whereas zero is a number and blank space is a character.ee ee ee ee ee ee must either follow all the rules or nothing at all. So, if ‘one part of the transaction fails, then the entire transaction fails. This is a feature of the E-R model which allows a relationship set to participate in another relationship set There are three levels of data abstraction in DBMS. They are: + Physical Level: It is the lowest level of abstraction and describes how the data is stored, + Logical Level: This is the next level of abstraction after the Physical level. This layer determines what data is stored in the database, and what is the relationship between the data points. + View Level: The View Level is the highest level of abstraction and it describes only a part of the entire database, Itis a diagrammatic approach to database design, where you represent real-world objects as entities and mention relationships between them. This approach helps the team of DBAs’ to understand the schema easily + Entity: An entity is a real-world object having attributes, which are nothing but characteristics of that particular object. For example, an employee can be an entity. This particular entity can have attributes such as empid, empname, etc. + Entity Type: Entity type is nothing but a collection of entities, having the same attributes. Generally, an entity type refers to one or more related tables in a particular database. So, you can understand, entity type as a characteristic which uniquely identifies the entity. For example, An employee can have attributes such as empid, empname, department, etc. + Entity Set: An entity set is the collection of all the entities of a particular entity type in a database. For ‘example, a set of employees, a Set of companies, and a set of people can come under an entity set. A relationship in DBMS is the scenario where two entities are related to each other. In such a scenario, the table consisting of foreign key references to that of a primary key of the other table. The different types of relationships in DBMS are as follows: + One-to-One Relationship — Used when a single row in Table A is related to a single row in Table B + One-to-Many Relationship — Used when a single row in Table A is related to many rows in table B. + Many-to-Many Relationship — Used when many rows in table A can be related to many rows in table B. + Self Referencing Relationship — Used when a record in table A is related to the same table itself. 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 ACID stands for Atomicity, Consistency, Isolation, Durability. It is used to ensure that the data transactions are processed reliably in a database system+ Atomicity: Atomicity refers to those transactions which are completely successful or failed. Here each transaction refers to a single logical operation of a data. So, even if one part of any transaction fails, the entire transaction fails and the database state is left unchanged. + Consistency: Consistency ensures that the data must meet all the validation rules. In simple words, you can say that your transaction never leaves the database without completing its state. ‘+ Isolation: The main goal of isolation is concurrency control + Durability: Durability means that if a transaction has been committed, it will occur whatever may be the scenario. The process of organizing data to avoid any duplication of data and redundancy is known as Normalization. There are many successive levels of normalization which are known as normal forms. Each consecutive normal form depends on the previous one. The following are the first three normal forms. Apart from these, you have higher normal forms such as BCNF. «First Normal Form (1NF) — No repeating groups within rows * Second Normal Form (2NF) — Every non-key (supporting) column value is dependent on the whole primary key. + Third Normal Form (3NF) — Dependent solely on the primary key and no other non-key (supporting) ‘column value. There are mainly 7 types of Keys, that can be considered in a database. | am going to consider the below tables to explain to you the various keys w Super Key Primary Key exentede |S vu Altornate Key CUSTOMER INFO TABLE ustomerID CustomerName PhoneNumber _ PanNumber 2 Anmol ‘9876543210 DWIB1382 2 Soumya 9955338124 wse08291 3 Mahesh 9876434897 4Jaacseso 4 Anjali 9876543234 GHIKeE71 5 Gowtham 9876523456 FGHI7281 fo) Enea ns 1 Jan_2019 40000 2 Feb_2019 50000 2 Jan_2019 as000 a Feb_2019 60000 s Jan_2019 75000 (CUSTOMER PAYMENT TABLE + Candidate Key - This is a set of attributes which can uniquely identify a table. Each table can have more than a candidate key. Apart from this, out of all the candidate keys, one key can be chosen as the Primary key. In the above example, since CustomerID and PanNumber can uniquely identify every tuple, they would be considered as a Candidate Key.‘An exclusive lock is a lock on a data item when a | A shared lock allows more than one transaction to transaction is about to perform the write operation. | read the data items. Next, in this article on DBMS interview questions, TRUNCATE ys Used to delete a database, table [Used to delete all rows froma — | 1.4 44 delete a row in the table ora view table Data cannot be rollbacked Data cannot be rolibacked Data can be rollbacked ADDL command ADDL command ADML command. ‘Slower than TRUNCATE Faster than DROP and DELETE | Slower than TRUNCATE Deletes the full structure of the [Preserves the structure of the | Deletes the structure of the row table table froma table SQL aka Structured Query Language is the core of the relational database which is used for accessing and managing the databases. This language is used to manipulate and retrieve data from a structured data format in the form of tables and holds relationships between those tables. So, in layman terms, you can use SQL to communicate with the database. A subquery is a query inside another query where a query is defined to retrieve data or information back from the database. In a subquery, the outer query is called as the main query whereas the inner query is called subquery. Subqueries are always executed first and the result of the subquery is passed on to the main query. It can be nested inside a SELECT, UPDATE or any other query. A subquery can also use any comparison operators such as >,< or =. Q Combines the result of two or more SELECT ‘Combines the result set of two or more SELECT statements consisting of distinct values statements consisting of duplicate values ‘Syntax: UNION ‘Syntax: UNION ALL Has low performance than UNION ALL, as duplicate| Has better performance than UNION, as duplicate rows need to be removed. rows need not have to be removed. Q5. What do you understand by CLAUSE in SQL? CLAUSE in SQL is used to limit the result set by mentioning a condition to the query. So, you can use a CLAUSE to filter rows from the entire set of records. Example: WHERE HAVING clause.PAT WHERE Used only with SELECT statement Used in @ GROUP BY clause ‘Applied to each row before they are a part of the Used with the GROUP BY function in a query GROUP BY function in a query Q7. How can you perform pattern matching in SQL? You can perform pattem matching in SQL by using the LIKE operator. With the LIKE operator, you can use the following symbols: 1, %(Percentage sign) — To match zero or more characters. 2. _(Underscore) —To match exactly one character. Example: SELECT * FROM Customers WHERE CustomerName LIKE 's%" SELECT * FROM Customers WHERE CustomerName like 'xyz_’ Q8. Mention few case manipulation functions in SQL There are three case manipulation functions in SQL, namely: LOWER: This function retums the string in lowercase. It takes a string as an argument and returns it by converting it into lower case. Syntax: LOWER(string’) UPPER: This function returns the string in uppercase. It takes a string as an argument and returns it by converting it into uppercase. syntax: _UPPER( ‘string”) INITCAP: This function returns the string with the first letter in uppercase and the rest of the letters in lowercase Syntax: INITCAP(string’) Q ‘A JOIN clause is used to combine rows from two or more tables, based on a related column between them. It is used to merge two tables or retrieve data from there. There are 4 joins in SQL namely: Inner Join Right Join Left Join Full Join —_———————EEEEEEEEees A view in SQL is a single table, which is derived from other tables. So, a view contains rows and columns similar to a real table and has fields from one or more table. To create a view, use the following syntax:+ Primary Key ~ This is a set of attributes which are used to uniquely identify every tuple. In the above ‘example, since CustomerID and PanNumber are candidate keys, any one of them can be chosen as a Primary Key. Here CustomerID is chosen as the primary key. * Unique Key — The unique key is similar to the primary key, but allows NULL values in the column. Here the PanNumber can be considered as a unique key. + Alternate Key — Altemate Keys are the candidate keys, which are not chosen as a Primary key. From the above example, the alternate key is PanNumber + Foreign Key ~An attribute that can only take the values present as the values of some other attribute, is the foreign key to the attribute to which it refers. in the above example, the CustomerID from the ‘Customers Table is referred to the CustomerID from the Customer_Payment Table. + Composite Key — A composite key is a combination of two or more columns that identify each tuple uniquely. Here, the CustomerID and Date_of_Payment can be grouped together to uniquely identify every tuple in the table. A correlated subquery is also a sort of subquery reliant on another query. So, when subqueries are executed for each of the rows of outer queries, then they are termed as correlated subqueries. Each subquery is executed a single time for every row of the outer query. You can also understand correlated subqueries as those queries, which are used for row-by-row processing by the parent statement. Here, the parent statement can be SELECT, UPDATE or DELETE statement. Data partitioning is the process of dividing a logical database into independent units for the betterment of availability, performance, and manageability. The importance of database partitioning is as follows: + Enables you to access large parts of a specific partition + Cheap and slower storage can be used to store data + Improves query performance Functional Dependency: A functional dependency is a constraint that is used in describing the relationship among different attributes in a relation. Example: Consider a relation “A1" having attributes X and Y. The functional dependency among these two attributes will be X > Y, this implies that Y is functionally dependent on X. Transitive Dependency: A transitive dependency is a constraint that can only occur in a relation of three or more attributes. Example: Consider a relation “A1" having attributes X, Y and Z. Now, X->2Z is said to hold transitive dependency, only if the following functional dependencies holds true: © XY + Ydoesn't->X YoZ| This is similar to the client-server architecture. Oe en ne RL a, See the client and the server. Clients directly communicate with the database at the server-side ‘Clients communicate with an application(GUI) on the| server-side, that makes the system more secure and accessible. This application thereafter ‘communicates with the database system. \ ee _- = & = a“ & De tom Wire Unique Key can have a NULL value — -E-a — om “Application Coy The primary key cannot have a NULL value Each table can have more than one unique key Each table can have only one primary key 21. What is a checkpoint in DBMS and when does it ocour? ‘A checkpoint is a mechanism where all the previous logs are removed from the system and are permanently stored on the storage disk. So, basically, checkpoints are those points from where the transaction log record can be used to recover all the committed data up to the point of crash. Next, le us discuss one of the most commonly asked DBMS interview questions, that is: Dart ‘A special kind of stored procedure that is not called directly by a user. In fact, a trigger is created and is programmed to fire when a specific event occurs. See ioce tis ‘A group of SQL statements which can be reused again and again. These statements are created and stored in the database. ‘A trigger cannot be called or execute directly by a user. Only when the corresponding events are fired, triggers are created. Can execute stored procedures by using the exec command, whenever we want. You cannot schedule a trigger. You can schedule a job to execute the stored procedure on a pre-defined time. Cannot directly call another trigger within a trigger. Call a stored procedure from another stored procedure. Parameters cannot be passed as input Parameters can be passed as input Cannot return values. Can retum zero or n values.Specialization: Specialization is process of defining a set of subclasses of the entity type. Here, each subclass will contain all the attributes and relationships of the parent entity. Apart from this, the subclasses may contain additional attributes and relationships specific to itself. «Generalization: Generalization is a process of finding relations, common attributes for a particular ‘set of entities; and finally defining a common superclass for them. When you say an application has data independence, it implies that the application is independent of the storage structure and data access strategies of data The different integrity rules present in DBMS are as follows + Entity Integrity: This rule states that the value of the primary key can never be NULL. So, all the tuples in the column identified as the primary key should have a value. + Referential Integrity: This rule states that either the value of the foreign key is NULL or it should be the primary key of any other relation. Fill Factor is used to mention the percentage of space left on every leaf-level page, which is packed with data. Usually, the default value is 100. The process of boosting a collection of indexes is known as Index hunting. This is done as indexes improve the query performance and the speed at which they are processed It helps in improving query performance in the following way: + The best queries are suggested using the query optimizer. ‘+ Index, query distribution and their performance are used as metrics to check the effect ‘+ Databases are tuned into a small collection of problem queries, A top-down structure where each parent node can have many child nodes. But, a child node can have only a single parent node. Each parent node can have multiple children nodes and vice versa. ‘Supports one-to-one, one-to-many, and many-to- 's one-tone and one-to- I many relationships ‘Supports one-tone and one-to-many relationships Q34. Explain what is a deadlock and mention how it can be resolved? Deadlock is a situation which occurs when two transactions wait on a resource which is locked or other transaction holds. Deadlocks can be prevented by making all the transactions acquire all the locks at the same instance of time. So, once deadlock occurs, the only way to cure is to abort one of the transactions and remove the partially completed work.Q23. What are the differences between Hash join, Merge join and Nested loops? ‘Merge join is used when projections of the joined tables are sorted on the join columns. The hash join is used when you have to join large tables, The nested loop consists of an outer loop and an inner loop. + Proactive Update: These updates are applied to the database before it becomes effective in the real-world environment. + Retroactive Update: These retroactive updates are applied to a database after it becomes effective in the real-world environment. + Simultaneous Update: These updates are applied to the database at the same instance of time as it becomes effective in a real-world environment aa aw Indexes are data structures responsible for improving the speed of data retrieval operations on a table. This data structure uses more storage space to maintain extra copies of data by using additional writes. So, indexes are mainly used for searching algorithms, where you wish to retrieve data in a quick manner. The differences between clustered and non-clustered index are as follows: sree Maron Demeter iano A clustered index is faster Non clustered index is relatively slower Alters the way records are stored in a database as it| Does not alter the way it was stored but it creates 4 sorts out rows by the column which is set to be ‘separate object within a table which points back to clustered index the original table rows after searching ‘One table can only have many non clustered indexes Q26, What do you understand byintension and extension? —— Intension: intension or most commonly known as Database schema defines the description of the database. This is specified during the database design and mostly remains unchanged One table can only have one clustered index Extension: Extension is the number of tuples available in the database at any instance of time. This value keeps changing as and when the tuples are created, updated and destroyed. So, the data present in the database at a specific instance of time is known as the extension of the database or most commonly known as the snapshot of the database. The types of cursor are as follows: + Implicit cursor: This type of cursor is declared automatically as soon as the execution of SQL takes place. Here, the user is not indicated about the declaration of the cursor.
You might also like
Dbms Cheat Sheet
PDF
100% (5)
Dbms Cheat Sheet
5 pages
DBMS Ninja Notes
PDF
No ratings yet
DBMS Ninja Notes
134 pages
DBMS Exam
PDF
100% (1)
DBMS Exam
44 pages
Dbms Viva Questions
PDF
No ratings yet
Dbms Viva Questions
14 pages
DBMS Notes 2
PDF
No ratings yet
DBMS Notes 2
7 pages
Dbms Interview Questions
PDF
No ratings yet
Dbms Interview Questions
11 pages
Top DBMS Interview Questions and Answers (2024 Updated) - InterviewBit
PDF
No ratings yet
Top DBMS Interview Questions and Answers (2024 Updated) - InterviewBit
25 pages
Database Interview Questions
PDF
No ratings yet
Database Interview Questions
9 pages
Adbms Imp
PDF
No ratings yet
Adbms Imp
25 pages
Updated DBMS IMPORTANT QUES FOR MID SEM
PDF
No ratings yet
Updated DBMS IMPORTANT QUES FOR MID SEM
19 pages
DBMS Theory
PDF
No ratings yet
DBMS Theory
4 pages
Unit-1 Database Management System
PDF
No ratings yet
Unit-1 Database Management System
46 pages
DBMS Proper
PDF
No ratings yet
DBMS Proper
22 pages
Dbmsconcepts Intro
PDF
No ratings yet
Dbmsconcepts Intro
50 pages
Advance DB Notes V2
PDF
No ratings yet
Advance DB Notes V2
13 pages
DBMS and SQL
PDF
No ratings yet
DBMS and SQL
108 pages
DBMS & SQL
PDF
No ratings yet
DBMS & SQL
14 pages
PC03 DBMS Notes V-2 by Rajeev
PDF
No ratings yet
PC03 DBMS Notes V-2 by Rajeev
17 pages
Dbms CCV Questions
PDF
No ratings yet
Dbms CCV Questions
14 pages
Dbms Notes
PDF
No ratings yet
Dbms Notes
13 pages
Document 1
PDF
No ratings yet
Document 1
6 pages
DBMS
PDF
No ratings yet
DBMS
135 pages
DBMS Notes
PDF
No ratings yet
DBMS Notes
6 pages
DBMS Lesson
PDF
No ratings yet
DBMS Lesson
80 pages
Chap-11 Relational Databases Notes Class 12
PDF
No ratings yet
Chap-11 Relational Databases Notes Class 12
12 pages
Unit - I Data Models and Querying
PDF
No ratings yet
Unit - I Data Models and Querying
78 pages
DBMS English
PDF
No ratings yet
DBMS English
4 pages
DBMS Interview Questions For Data Analyst
PDF
No ratings yet
DBMS Interview Questions For Data Analyst
23 pages
Dbms 15 Marks
PDF
No ratings yet
Dbms 15 Marks
44 pages
DBMS 50 Viva Questions
PDF
No ratings yet
DBMS 50 Viva Questions
19 pages
DBMS - NOTES - (Selected Topics)
PDF
No ratings yet
DBMS - NOTES - (Selected Topics)
36 pages
DBMS Interview Questions and Answers
PDF
No ratings yet
DBMS Interview Questions and Answers
5 pages
It Officer Notes Ebook
PDF
No ratings yet
It Officer Notes Ebook
352 pages
1 DBMS
PDF
No ratings yet
1 DBMS
43 pages
Ramya - Syllabus-& Unit - 1.
PDF
No ratings yet
Ramya - Syllabus-& Unit - 1.
111 pages
Some Important Ques
PDF
No ratings yet
Some Important Ques
14 pages
Dbms 2. Rdbms 3. History 4. Types 5. Dbms Vs Rdbms
PDF
No ratings yet
Dbms 2. Rdbms 3. History 4. Types 5. Dbms Vs Rdbms
24 pages
DBMS NJNN
PDF
No ratings yet
DBMS NJNN
38 pages
Chapter 1
PDF
No ratings yet
Chapter 1
103 pages
Important Question For DBMS
PDF
No ratings yet
Important Question For DBMS
34 pages
Imp Ans
PDF
No ratings yet
Imp Ans
7 pages
DBMS Interview Questions (Codeofgeeks) PDF
PDF
100% (1)
DBMS Interview Questions (Codeofgeeks) PDF
16 pages
Dbms
PDF
No ratings yet
Dbms
21 pages
Questio S Answers of DBM S
PDF
No ratings yet
Questio S Answers of DBM S
13 pages
Dbms
PDF
No ratings yet
Dbms
39 pages
Dbms Questions
PDF
No ratings yet
Dbms Questions
34 pages
Dbms Notes
PDF
No ratings yet
Dbms Notes
18 pages
Dbms Notes
PDF
No ratings yet
Dbms Notes
9 pages
Unit 1 Data and Information
PDF
No ratings yet
Unit 1 Data and Information
27 pages
Dbms Presentation
PDF
No ratings yet
Dbms Presentation
50 pages
Tashita
PDF
No ratings yet
Tashita
21 pages
Dbms
PDF
No ratings yet
Dbms
8 pages
DBMS Solution Paper 2009
PDF
No ratings yet
DBMS Solution Paper 2009
4 pages
SEM 2 MC0067 Database Management System DBMS Oracle9i
PDF
No ratings yet
SEM 2 MC0067 Database Management System DBMS Oracle9i
13 pages
Topic Beyond Syllabus DBMS
PDF
No ratings yet
Topic Beyond Syllabus DBMS
12 pages
DBMS 2018 Qus ANSWERS WRD
PDF
No ratings yet
DBMS 2018 Qus ANSWERS WRD
8 pages
Database Management System New Notes
PDF
No ratings yet
Database Management System New Notes
17 pages
DBMS Full
PDF
No ratings yet
DBMS Full
32 pages
Unit 1 Introduction of DBMS
PDF
No ratings yet
Unit 1 Introduction of DBMS
8 pages