0% found this document useful (0 votes)
5 views12 pages

Dbms Interview Master Kit

The document is a comprehensive DBMS Interview Master Kit created by G. Trinadha Rao for students at Aditya Degree College, Bhimavaram. It includes essential questions and answers covering key concepts of Database Management Systems, such as types of DBMS, normalization, SQL commands, and transaction properties. The kit aims to prepare students for interviews with major tech companies and government exams by revising the material thoroughly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views12 pages

Dbms Interview Master Kit

The document is a comprehensive DBMS Interview Master Kit created by G. Trinadha Rao for students at Aditya Degree College, Bhimavaram. It includes essential questions and answers covering key concepts of Database Management Systems, such as types of DBMS, normalization, SQL commands, and transaction properties. The kit aims to prepare students for interviews with major tech companies and government exams by revising the material thoroughly.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ADITYA DEGREE COLLEGE: BHIMAVARAM

(DIRUSUMARRU ROAD)
Beside KGRL COLLEGE

PLACEMENT CELL ADC – BVRM

DBMS INTERVIEW MASTER KIT

MASTER TIP: Revise this kit twice before interviews it covers 90% of questions asked in
TCS, Infosys, Wipro, Tech Mahindra, Capgemini, Accenture, and government tech
exams.

Presented By
G. TRINADHA RAO (M SC CS)
Lecturer in computer science & TPO

ADITYA DEGREE COLLEG, BHIMAVARAM

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
DBMS INTERVIEW MASTER KIT

1. What is DBMS?
2. What are the advantages of DBMS?
3. What is a database?
4. What are different types of DBMS?
5. What is RDBMS?
6. What is a table?
7. What is a field and record?
8. What are keys in DBMS?
9. What is a primary key?
10. What is a foreign key?

11. What is a candidate key?


12. What is a super key?
13. What is a composite key?
14. What is normalization?
15. What is denormalization?
16. Explain 1NF (First Normal Form).
17. Explain 2NF (Second Normal Form).
18. Explain 3NF (Third Normal Form).
19. What is BCNF (Boyce-Codd Normal Form)?
20. What are anomalies in DBMS?

21. What is an entity in DBMS?


22. What is an attribute?
23. What is an entity-relationship (ER) model)?
24. What is cardinality in DBMS?
25. What are the different types of relationships in DBMS?
26. What is SQL?
27. What are the different types of SQL commands?
28. What is a schema?
29. What is a view in DBMS?
30. What is a stored procedure?

31. What is a trigger?


32. What is a cursor in DBMS?
33. What is indexing in DBMS?
34. What are clustered and non-clustered indexes?
35. What are joins in SQL?
36. Explain different types of joins.
37. What is a subquery?
38. What is the difference between DELETE and TRUNCATE?
39. What is the difference between DROP and TRUNCATE?

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
40. What is a transaction in DBMS?

41. What are the properties of a transaction (ACID)?


42. What is concurrency control in DBMS?
43. What are locks in DBMS?
44. What is deadlock and how is it handled?
45. What is data integrity?
46. What is data redundancy?
47. What is data independence?
48. What is distributed database system?
49. What is data warehousing?
50. What are the differences between DBMS and RDBMS?

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
DBMS INTERVIEW MASTER KIT

1. What is DBMS?
DBMS stands for Database Management System.
It is software that manages data efficiently and allows easy access.
It provides an interface between the database and users or applications.
It ensures data consistency, security, and integrity.
Examples: MySQL, Oracle, SQL Server.

2. What are the advantages of DBMS?


It reduces data redundancy and maintains consistency.
Provides centralized control over data.
Ensures data security through authorization.
Supports multiple user access and transactions.
Allows efficient data retrieval using queries.

3. What is a database?
A database is an organized collection of related data.
It stores information in tables for easy access and management.
Databases support CRUD operations (Create, Read, Update, Delete).
They ensure data integrity and security.
Examples: Student records, employee data.

4. What are different types of DBMS?


1️. Hierarchical DBMS
2️. Network DBMS
3️. Relational DBMS (RDBMS)
4️. Object-oriented DBMS
Among these, RDBMS is most widely used.

5. What is RDBMS?
RDBMS stands for Relational Database Management System.
It stores data in tables related by keys.
It uses SQL for managing and querying data.
Ensures normalization and referential integrity.
Examples: MySQL, PostgreSQL, Oracle.

6. What is a table?
A table is a collection of related data organized in rows and columns.
Each row represents a record, and each column represents a field.
Tables store data in structured form.
They form the basic unit of a relational database.
Example: “Students” table with roll, name, and marks.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
7. What is a field and record?
A field is a single piece of data or attribute.
A record is a collection of related fields forming one row.
Example: In a student table — “name” is a field, and “John” is a record value.
Fields are columns, records are rows.
Together, they define database structure.

8. What are keys in DBMS?


Keys uniquely identify records in a table.
They help establish relationships between tables.
Common keys include primary, foreign, and candidate keys.
They maintain data integrity and uniqueness.
Without keys, data relations are ambiguous.

9. What is a primary key?


A primary key uniquely identifies each record in a table.
It cannot contain NULL or duplicate values.
Each table can have only one primary key.
Used to enforce entity integrity.
Example: Roll_No in student table.

10. What is a foreign key?


A foreign key establishes a link between two tables.
It references the primary key of another table.
Ensures referential integrity across relations.
It can contain duplicate or NULL values.
Example: Dept_ID in Employee table referring to Department table.

11. What is a candidate key?


Candidate keys are all possible keys that can act as primary key.
They uniquely identify each record in a table.
From these, one is chosen as the primary key.
Others remain as alternate keys.
Example: Roll_No, Email_ID in Student table.

12. What is a super key?


A super key is any combination of fields that can uniquely identify a record.
Every primary key is a super key.
But not every super key is a primary key.
It may contain extra attributes.
Example: (Roll_No, Name) can be a super key.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
13. What is a composite key?
A composite key combines two or more attributes to uniquely identify a record.
Used when no single attribute is unique.
Ensures entity integrity in complex data models.
Common in many-to-many relationship tables.
Example: (Student_ID, Course_ID).

14. What is normalization?


Normalization organizes data to reduce redundancy.
It divides large tables into smaller, related ones.
Ensures consistency and integrity of data.
Involves forms like 1NF, 2NF, 3NF, BCNF.
Improves database performance and clarity.

15. What is denormalization?


Denormalization is combining normalized tables to improve performance.
It introduces redundancy intentionally.
Used when faster query performance is needed.
Common in data warehousing and analytics.
Balances speed and data integrity.

16. Explain 1NF (First Normal Form).


Each table cell should contain atomic (single) values.
Each record must be unique.
No repeating groups or arrays are allowed.
Ensures simple data structure.
It’s the foundation of all normalization levels.

17. Explain 2NF (Second Normal Form).


Table must be in 1NF.
All non-key attributes must depend fully on the primary key.
Removes partial dependencies.
Useful for tables with composite keys.
Improves relational data design.

18. Explain 3NF (Third Normal Form).


Table must be in 2NF.
No transitive dependency should exist.
Each non-key attribute must depend only on the primary key.
Removes indirect relationships.
Ensures optimal database design.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
19. What is BCNF (Boyce-Codd Normal Form)?
Stronger version of 3NF.
Every determinant must be a candidate key.
Removes anomalies not covered by 3NF.
Maintains higher data integrity.
Applied in complex relationships.

20. What are anomalies in DBMS?


Anomalies occur due to poor database design.
Types: Insertion, Deletion, and Update anomalies.
They lead to redundant or inconsistent data.
Normalization helps remove anomalies.
Ensures reliable data structure.

21. What is an entity in DBMS?


An entity represents a real-world object or concept.
Each entity has attributes that describe it.
Entities become tables in databases.
Example: Student, Employee, Department.
Used in ER modeling.

22. What is an attribute?


An attribute defines a property of an entity.
It represents a column in a database table.
Each attribute holds a specific data type.
Examples: Name, Age, Salary.
They describe characteristics of records.

23. What is an entity-relationship (ER) model?


ER Model represents database structure using diagrams.
It shows entities, attributes, and their relationships.
Developed by Peter Chen in 1976.
Used in database design phase.
Helps visualize data connections.

24. What is cardinality in DBMS?


Cardinality defines the number of relationships between entities.
Types: One-to-One, One-to-Many, Many-to-Many.
Determines how entities are related.
Helps in table design and foreign key creation.
Used in ER diagrams.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
25. What are the different types of relationships in DBMS?
One-to-One → One record relates to one record.
One-to-Many → One record relates to many records.
Many-to-Many → Many records relate to many others.
Implemented using foreign keys.
Defined in ER modeling.

26. What is SQL?


SQL stands for Structured Query Language.
Used to store, manipulate, and retrieve data in RDBMS.
It’s a standard language for database communication.
Includes commands for DDL, DML, DCL, and TCL.
Supported by most database systems.

27. What are the different types of SQL commands?


1️. DDL – Data Definition Language (CREATE, DROP).
2️. DML – Data Manipulation Language (INSERT, UPDATE).
3️. DCL – Data Control Language (GRANT, REVOKE).
4️. TCL – Transaction Control Language (COMMIT, ROLLBACK).
5️. DQL – Data Query Language (SELECT).

28. What is a schema?


Schema defines the structure and organization of a database.
It includes tables, fields, and relationships.
Acts as a blueprint for the database.
Each user can have their own schema.
It provides logical view of data.

29. What is a view in DBMS?


A view is a virtual table derived from SQL queries.
It does not store data physically.
Provides data security and abstraction.
Simplifies complex queries.
Created using the CREATE VIEW command.

30. What is a stored procedure?


A stored procedure is a precompiled collection of SQL statements.
It is stored and executed in the database.
Improves performance and reduces redundancy.
Supports parameters for dynamic execution.
Useful for automating repetitive tasks.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
31. What is a trigger?
A trigger automatically executes in response to specific events.
Events include INSERT, UPDATE, or DELETE operations.
Used to maintain data integrity and audit trails.
Created using CREATE TRIGGER command.
Enhances database automation.

32. What is a cursor in DBMS?


A cursor is a database object used to retrieve rows one by one.
Useful for row-level processing in SQL.
Supports traversal of query results.
Must be declared, opened, fetched, and closed.
Often used in stored procedures.

33. What is indexing in DBMS?


Indexing improves data retrieval speed.
It creates a data structure for quick lookups.
Acts like a book index for searching records.
Can be unique or non-unique.
Too many indexes can slow down inserts.

34. What are clustered and non-clustered indexes?


Clustered index sorts actual data in table order.
Each table can have only one clustered index.
Non-clustered index stores pointers to actual data.
Multiple non-clustered indexes can exist.
Both improve query performance.

35. What are joins in SQL?


Joins combine rows from two or more tables.
They use related columns (usually keys).
Used to retrieve meaningful combined data.
Main types: INNER, LEFT, RIGHT, FULL JOIN.
Essential for relational database queries.

36. Explain different types of joins.


INNER JOIN → Matches rows in both tables.
LEFT JOIN → Returns all rows from left, matching from right.
RIGHT JOIN → Returns all rows from right, matching from left.
FULL JOIN → Combines both left and right records.
SELF JOIN → Joins a table with itself.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
37. What is a subquery?
A subquery is a query inside another query.
Used for filtering, calculations, or data extraction.
Can return single or multiple results.
Executed before the main query.
Enhances modularity and reusability.

38. What is the difference between DELETE and TRUNCATE?


DELETE removes specific rows based on condition.
TRUNCATE removes all rows in a table.
DELETE can be rolled back; TRUNCATE cannot (mostly).
TRUNCATE is faster and uses less log space.
Both free storage space differently.

39. What is the difference between DROP and TRUNCATE?


DROP deletes the entire table structure.
TRUNCATE removes data but keeps the table.
DROP cannot be rolled back easily.
TRUNCATE resets auto-increment counters.
DROP is more destructive than TRUNCATE.

40. What is a transaction in DBMS?


A transaction is a logical unit of work.
It ensures data consistency during multiple operations.
Includes commands like COMMIT and ROLLBACK.
Either completes fully or not at all.
Used for reliable database operations.

41. What are the properties of a transaction (ACID)?


A – Atomicity: All or none rule.
C – Consistency: Maintains data integrity.
I – Isolation: Transactions run independently.
D – Durability: Changes persist after commit.
These ensure reliable database systems.

42. What is concurrency control in DBMS?


Concurrency control manages simultaneous access to data.
Prevents conflicts and ensures consistency.
Uses locking and timestamp techniques.
Important in multi-user environments.
Avoids lost updates and inconsistencies.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
43. What are locks in DBMS?
Locks restrict access to data for concurrent transactions.
Types: Shared lock and Exclusive lock.
Shared allows read; exclusive allows write.
Prevents data conflicts and ensures integrity.
Controlled by the DBMS automatically.

44. What is deadlock and how is it handled?


Deadlock occurs when two transactions wait for each other’s locks.
It halts system progress.
Handled by prevention, detection, and timeout methods.
DBMS may roll back one transaction.
Avoided by consistent resource ordering.

45. What is data integrity?


Data integrity ensures accuracy and reliability.
Maintained using constraints like PRIMARY KEY and FOREIGN KEY.
Prevents invalid or inconsistent data entries.
Supports database reliability and trust.
Key part of database design.

46. What is data redundancy?


Data redundancy means duplication of data.
Occurs when same data stored multiple times.
Leads to wastage of memory and inconsistency.
Normalization reduces redundancy effectively.
Should be avoided for efficiency.

47. What is data independence?


Data independence separates data storage from applications.
Two types: Physical and Logical independence.
Allows changes in schema without affecting programs.
Improves flexibility and maintainability.
Achieved through abstraction layers.

48. What is distributed database system?


A distributed database stores data across multiple locations.
Sites communicate through a network.
Increases reliability and availability.
Supports local autonomy with global control.
Used in large-scale applications.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM
49. What is data warehousing?
Data warehousing collects and manages data from multiple sources.
Used for business analysis and decision-making.
Stores historical data for reporting.
Uses ETL (Extract, Transform, Load) process.
Supports OLAP systems.

50. What are the differences between DBMS and RDBMS?


DBMS stores data as files; RDBMS stores in tables.
RDBMS supports relationships via keys.
RDBMS enforces ACID properties.
DBMS does not support constraints or normalization.
RDBMS examples: MySQL, Oracle, PostgreSQL.

G. TRINADHA RAO
LECTURER IN CS & TPO
ADITYA DEGREE COLLEG, BHIMAVARAM

You might also like