HomeQuestions and Answers

DBMS Gate Questions with Answers Explained

Like Tweet Pin it Share Share Email

DBMS is an important subject for GATE aspirants, covering database concepts and practical applications. This collection of questions and answers helps students understand key topics, including relational databases, SQL, normalization, and more. It provides comprehensive coverage of questions for better exam preparation and builds a strong conceptual foundation for success in the GATE exam.

Relational Model

Question: What is the relational model in DBMS?

Answer:
The relational model represents data in tables called relations. Each relation consists of rows (tuples) and columns (attributes), and a schema defines its structure.

Question: Explain the concept of a primary key.

Answer:
A primary key is a unique identifier for a record in a table. It ensures that no two rows have the same value in the primary key column.

Question: What is a foreign key?

Answer:
A foreign key is an attribute in one table that references the primary key in another table. It establishes relationships between tables.

Question: Define candidate keys.

Answer:
Candidate keys are attributes or combinations of attributes that can uniquely identify a tuple in a relation.

Question: What is the difference between a primary key and a unique key?

Answer:
A primary key uniquely identifies rows and doesn’t allow null values, while a unique key also ensures uniqueness but can accept one null value.

Advertisements

Question: What are superkeys?

Answer:
Superkeys are sets of attributes that can uniquely identify rows in a table. A primary key is a minimal superkey.

Question: What is a relational schema?

Answer:
A relational schema defines the structure of a relation, including its attributes and the data types of those attributes.

Question: Explain the concept of referential integrity.

Answer:
Referential integrity ensures consistency between related tables by requiring that foreign key values match primary key values in the referenced table.

Question: What are integrity constraints?

Answer:
Integrity constraints are rules enforced on a database to maintain accuracy and consistency of data, such as primary key, foreign key, and check constraints.

Question: What is a tuple in the relational model?

Answer:
A tuple is a single row in a relation, representing a specific entity or record in the table.

See also  FA3 Maths Question Paper 2018 Questions and Answers

SQL

Question: What is SQL?

Answer:
SQL (Structured Query Language) is a standard programming language for managing and manipulating relational databases.

Question: Differentiate between DDL and DML commands.

Answer:
DDL commands (e.g., CREATE, ALTER) define database schema, while DML commands (e.g., INSERT, UPDATE) modify database data.

Question: What is the use of the SELECT statement?

Answer:
The SELECT statement retrieves data from one or more tables based on specified conditions.

Question: What does the WHERE clause do in SQL?

Answer:
The WHERE clause filters records in a query by specifying conditions that rows must meet.

Question: What are joins in SQL?

Answer:
Joins combine rows from two or more tables based on a related column, such as INNER JOIN or OUTER JOIN.

Question: What is a subquery in SQL?

Answer:
A subquery is a query nested within another query to fetch data used in the outer query.

Question: Explain GROUP BY and HAVING clauses.

Answer:
GROUP BY groups rows with similar values, and HAVING filters groups based on aggregate conditions.

Question: What is the difference between DELETE and TRUNCATE?

Answer:
DELETE removes specific rows with a condition, while TRUNCATE removes all rows without logging individual deletions.

Advertisements

Question: What are indexes in SQL?

Answer:
Indexes are database objects that improve query performance by providing faster data retrieval.

Question: How does a stored procedure differ from a function?

Answer:
Stored procedures perform tasks but may not return values, while functions return a value and can be used in queries.

Normalization

Question: What is normalization in DBMS?

Answer:
Normalization organizes data to reduce redundancy and dependency, dividing tables into smaller, related tables.

Question: What is 1NF?

Answer:
First Normal Form (1NF) ensures that a table has only atomic values and no repeating groups.

Question: Explain 2NF.

Answer:
Second Normal Form (2NF) eliminates partial dependency, ensuring that all non-key attributes are fully dependent on the primary key.

See also  2nd semester English question paper questions

Question: What is 3NF?

Answer:
Third Normal Form (3NF) removes transitive dependency, ensuring non-key attributes depend only on the primary key.

Question: Define BCNF.

Answer:
Boyce-Codd Normal Form (BCNF) is a stricter version of 3NF, where every determinant is a candidate key.

Question: What is denormalization?

Answer:
Denormalization combines tables to improve query performance, often at the cost of redundancy.

Question: Explain functional dependency.

Answer:
Functional dependency occurs when one attribute uniquely determines another attribute.

Question: What is multivalued dependency?

Answer:
Multivalued dependency occurs when one attribute determines multiple independent attributes.

Question: Differentiate between normalization and denormalization.

Answer:
Normalization reduces redundancy and dependency, while denormalization optimizes performance by combining tables.

Question: What is the purpose of normalization?

Answer:
Normalization improves data integrity, minimizes redundancy, and ensures consistent database design.

Transaction Management

Question: What is a transaction in DBMS?

Answer:
A transaction is a sequence of operations that performs a single logical unit of work in a database.

Question: What are ACID properties?

Answer:
ACID properties (Atomicity, Consistency, Isolation, Durability) ensure reliable database transactions.

Question: What is the difference between COMMIT and ROLLBACK?

Answer:
COMMIT saves changes made by a transaction, while ROLLBACK undoes changes since the last COMMIT.

Question: Explain concurrency control.

Answer:
Concurrency control manages simultaneous transactions to prevent conflicts and maintain data consistency.

Question: What is a schedule in DBMS?

Answer:
A schedule is the order in which operations from different transactions are executed.

Question: What is a serial schedule?

Answer:
A serial schedule executes transactions one after another, maintaining consistency.

Question: What is a deadlock?

Answer:
A deadlock occurs when two or more transactions wait indefinitely for resources locked by each other.

Question: What is a timestamp-based protocol?

Answer:
A timestamp-based protocol assigns timestamps to transactions to maintain serializability.

Question: Define two-phase locking.

Answer:
Two-phase locking is a protocol where a transaction locks resources in a growing phase and releases them in a shrinking phase.

Question: What is the difference between shared and exclusive locks?

Answer:
A shared lock allows multiple transactions to read, while an exclusive lock allows only one transaction to modify data.

See also  2nd year Assamese question answer

Indexing

Question: What is indexing in DBMS?

Answer:
Indexing improves query performance by creating data structures for quick data retrieval.

Question: What are clustered indexes?

Answer:
Clustered indexes store data in the order of the index key, physically arranging table rows.

Question: What are non-clustered indexes?

Answer:
Non-clustered indexes store pointers to the actual data rows, allowing multiple indexes per table.

Question: What is a B-tree index?

Answer:
A B-tree index is a balanced tree data structure used for indexing in databases.

Question: What is a hash index?

Answer:
A hash index uses a hash function to map keys to locations, enabling quick lookups.

Question: Explain the difference between primary and secondary indexes.

Answer:
Primary indexes are built on primary keys, while secondary indexes are built on non-primary key columns.

Question: What are the advantages of indexing?

Answer:
Indexing improves query performance, speeds up searches, and enhances database efficiency.

Question: What are the disadvantages of indexing?

Answer:
Indexing increases storage requirements and slows down insert, update, and delete operations.

Question: How does an index work in DBMS?

Answer:
An index creates a data structure that allows the database to quickly locate and access rows based on key values.

Question: What is a composite index?

Answer:
A composite index is an index on multiple columns, improving query performance for combined column searches.

Understanding DBMS concepts is crucial for GATE preparation, as the subject is integral to the exam. This compilation of questions and answers covers essential topics such as relational models, SQL, normalization, and more. It helps students strengthen their understanding and enhance problem-solving skills for better exam results.

Comments (0)

Leave a Reply

Your email address will not be published. Required fields are marked *