0% found this document useful (0 votes)
40 views32 pages

DBMS Imp

The document provides a comprehensive overview of Database Management Systems (DBMS), covering essential topics such as database models, SQL, normalization, transactions, indexing, and database design. It includes important questions, multiple-choice questions, and answers to reinforce understanding of key concepts. Additionally, it addresses advanced topics like distributed databases and database security.

Uploaded by

pathaksapna34
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
40 views32 pages

DBMS Imp

The document provides a comprehensive overview of Database Management Systems (DBMS), covering essential topics such as database models, SQL, normalization, transactions, indexing, and database design. It includes important questions, multiple-choice questions, and answers to reinforce understanding of key concepts. Additionally, it addresses advanced topics like distributed databases and database security.

Uploaded by

pathaksapna34
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 32

IMPORTANT TOPICS

1. Introduction to DBMS

· Database Definition, Data Models, and DBMS architecture

· Difference between DBMS and RDBMS

· Types of Databases (Centralized, Distributed, Hierarchical, Network, Relational)

2. Database Models

· Relational Model (Tables, Keys, Constraints)

· Entity-Relationship Model (ER diagram, Entities, Attributes, Relationships, Cardinality)

· Network Model

· Hierarchical Model

3. Relational Algebra and Relational Calculus

· Relational Algebra Operations (Select, Project, Union, Difference, Cartesian Product, Join,
Rename)

· Tuple Relational Calculus (TRC) and Domain Relational Calculus (DRC)

4. Normalization

· Normal Forms (1NF, 2NF, 3NF, BCNF)

· Functional Dependency and its Role in Normalization

· Decomposition and Lossless Join Decomposition

5. SQL (Structured Query Language)

· DDL (Data Definition Language): CREATE, ALTER, DROP

· DML (Data Manipulation Language): SELECT, INSERT, UPDATE, DELETE

· Constraints (Primary Key, Foreign Key, Unique, Check, Not Null)


· Join Operations (Inner Join, Outer Join, Cross Join, Self Join)

· Subqueries, Nested Queries, and Views

6. Transactions and Concurrency Control

· ACID Properties (Atomicity, Consistency, Isolation, Durability)

· Transaction States

· Concurrency Control Mechanisms (Locking, Timestamping, Two-Phase Locking)

· Deadlock and its Prevention/Detection

7. Indexing

· Types of Indexes (Primary, Secondary, Clustered, Non-clustered)

· B-Tree and B+ Tree Indexes

· Hashing Techniques

8. Database Design

· Entity-Relationship (ER) Model to Relational Schema Conversion

· Design of Relational Schemas and Integrity Constraints

· Mapping Constraints (1:1, 1:N, N:M)

9. File Organization

· File Structure (Heap, Sorted, Clustered)

· Indexing (B-Trees, Hash Indexing)

· Data Storage and Retrieval

10. Distributed Databases

· Architecture of Distributed Databases


· Data Fragmentation, Replication, and Allocation

· Distributed Query Processing and Optimization

· Consistency and Concurrency in Distributed Databases

11. Database Security

· Security Issues in DBMS

· Authorization, Authentication, and Access Control

· Encryption and Integrity

VERY IMPORTANT QUETION


### **1. Basic Concepts and DBMS Architecture**

- **Q1**: Define DBMS. Explain its advantages over file-based systems.

- **Q2**: Differentiate between the terms *Database*, *DBMS*, and *RDBMS*. Provide examples.

- **Q3**: Explain the components of a DBMS architecture with a neat diagram.

- **Q4**: What is the role of a Database Administrator (DBA)? Discuss the key responsibilities.

### **2. Entity-Relationship Model**

- **Q5**: What is an Entity-Relationship (ER) Diagram? Draw an ER diagram for a university database
system, including entities like *Student*, *Course*, *Professor*, and relationships.

- **Q6**: Convert the following ER diagram to a relational schema:

- A company has *Departments* with a *Manager*, and each *Department* has multiple
*Employees*.

- **Q7**: Discuss the concepts of *Generalization*, *Specialization*, and *Aggregation* in ER


modeling.

### **3. Relational Model and SQL**


- **Q8**: Explain the relational model of databases. What are *relations*, *tuples*, and *attributes*
in this context?

- **Q9**: Write SQL queries for the following:

- a) Retrieve the names of all employees who work in the 'HR' department.

- b) Find the total salary of all employees in each department.

- c) Delete all records from the 'Student' table where the student’s grade is below 50.

- **Q10**: What is the difference between *Primary Key* and *Foreign Key*? Provide an example.

### **4. Normalization**

- **Q11**: Explain the concept of normalization. What are the different normal forms? Discuss 1NF,
2NF, and 3NF with examples.

- **Q12**: Given the following table, normalize it to 3NF:

- Student (Student_ID, Student_Name, Course_Code, Course_Name, Instructor_Name,


Instructor_Phone)

- **Q13**: What is *BCNF*? How is it different from 3NF? Provide an example where a relation is in
3NF but not in BCNF.

### **5. Transactions and Concurrency Control**

- **Q14**: Define *transaction* in DBMS. Explain the ACID properties with examples.

- **Q15**: What are the different *transaction states*? Draw the state diagram of a transaction.

- **Q16**: Discuss the *Two-Phase Locking Protocol* and its role in concurrency control.

- **Q17**: Explain the concepts of *deadlock*, *deadlock prevention*, and *deadlock detection* in
DBMS.

### **6. Indexing and Hashing**

- **Q18**: What is an index in a database? Discuss the differences between a *clustered* and a *non-
clustered* index.

- **Q19**: Explain the structure of a *B-Tree* and *B+ Tree*. Why are they used for indexing?
- **Q20**: What is hashing? Discuss different hashing techniques used in databases.

### **7. Distributed Databases**

- **Q21**: Define a *distributed database*. Discuss its advantages and challenges.

- **Q22**: Explain *data fragmentation*, *data replication*, and *data allocation* in distributed
databases.

- **Q23**: Discuss the differences between *horizontal fragmentation* and *vertical fragmentation*
in a distributed database system.

### **8. Backup and Recovery**

- **Q24**: What are the different types of database backup? Discuss their advantages and
disadvantages.

- **Q25**: Explain the concepts of *checkpointing* and *log-based recovery* in the context of
database recovery.

### **9. Advanced Topics**

- **Q26**: What is *NoSQL*? Discuss the different types of NoSQL databases with examples.

- **Q27**: Explain the architecture of a *Data Warehouse* and discuss its components.

- **Q28**: Discuss the concept of *Data Mining* and how it is related to databases.

### **10. Case Study/Design Problem**

- **Q29**: Design a database for an online library system. Identify the entities and relationships, and
provide the ER diagram and relational schema.

- **Q30**: Consider a university database with students, courses, professors, and departments. Design
the database schema and write SQL queries to:

- a) Add a new student.

- b) Assign a professor to a course.

- c) Find all courses taught by a particular professor.


Here are some **MCQs** on **DBMS** with answers:

### **1. Which of the following is a feature of a DBMS?**

- a) Data redundancy

- b) Data inconsistency

- c) Data integrity

- d) None of the above

**Answer**: c) Data integrity

### **2. In a relational model, data is stored in the form of:**

- a) Objects

- b) Tables

- c) Files

- d) Lists

**Answer**: b) Tables

### **3. The basic unit of data in a database is:**

- a) Record

- b) Field

- c) File

- d) Tuple
**Answer**: d) Tuple

### **4. Which of the following is used to perform a SELECT operation in SQL?**

- a) INSERT

- b) UPDATE

- c) SELECT

- d) DELETE

**Answer**: c) SELECT

### **5. Which of the following is not a type of relationship in an ER diagram?**

- a) One-to-One

- b) One-to-Many

- c) Many-to-Many

- d) Many-to-Few

**Answer**: d) Many-to-Few

### **6. Which of the following is a property of a transaction?**

- a) Atomicity

- b) Consistency

- c) Isolation

- d) All of the above

**Answer**: d) All of the above


### **7. In which normal form is a relation free from partial dependency?**

- a) 1NF

- b) 2NF

- c) 3NF

- d) BCNF

**Answer**: b) 2NF

### **8. What is the full form of SQL?**

- a) Simple Query Language

- b) Structured Query Language

- c) Standard Query Language

- d) Sequential Query Language

**Answer**: b) Structured Query Language

### **9. Which of the following is a type of index?**

- a) Heap

- b) Clustered

- c) Record

- d) File

**Answer**: b) Clustered
### **10. In a relational database, a primary key:**

- a) Cannot have duplicate values

- b) Can have null values

- c) Can have duplicate values

- d) Can be changed once created

**Answer**: a) Cannot have duplicate values

### **11. Which of the following ensures that a database remains consistent even in the event of a
system crash?**

- a) Backup

- b) Transaction log

- c) Concurrency control

- d) Recovery manager

**Answer**: b) Transaction log

### **12. Which type of join returns all rows from the left table and matching rows from the right table?
**

- a) Inner Join

- b) Left Join

- c) Right Join

- d) Full Join

**Answer**: b) Left Join


### **13. In an SQL query, which clause is used to filter records based on a condition?**

- a) ORDER BY

- b) WHERE

- c) GROUP BY

- d) HAVING

**Answer**: b) WHERE

### **14. The relational database model was proposed by:**

- a) Codd

- b) Date

- c) Bachman

- d) Silverman

**Answer**: a) Codd

### **15. What is a foreign key in a database?**

- a) A key that uniquely identifies a record in a table

- b) A field in one table that uniquely identifies a record in another table

- c) A key that is used to join two tables

- d) Both b and c

**Answer**: d) Both b and c

### **16. Which of the following is used to retrieve data from one or more tables in a database?**
- a) SELECT

- b) INSERT

- c) UPDATE

- d) DELETE

**Answer**: a) SELECT

### **17. Which of the following is a disadvantage of DBMS?**

- a) Data redundancy

- b) Data inconsistency

- c) Costly to implement

- d) Data security

**Answer**: c) Costly to implement

### **18. Which of the following is a type of normalization technique?**

- a) 1NF

- b) 2NF

- c) 3NF

- d) All of the above

**Answer**: d) All of the above

### **19. In which normal form is a relation free from transitive dependency?**

- a) 1NF
- b) 2NF

- c) 3NF

- d) BCNF

**Answer**: c) 3NF

### **20. Which SQL command is used to remove a table from a database?**

- a) DELETE

- b) DROP

- c) REMOVE

- d) TRUNCATE

**Answer**: b) DROP

### **1. Which of the following is the primary advantage of using a DBMS?**

- a) Data redundancy

- b) Data inconsistency

- c) Data integrity

- d) Data isolation

**Answer**: c) Data integrity

### **2. In which normal form is a relation free from transitive dependencies?**

- a) 1NF

- b) 2NF
- c) 3NF

- d) BCNF

**Answer**: c) 3NF

### **3. The relational model of a DBMS is based on:**

- a) Graphs

- b) Tables

- c) Objects

- d) Trees

**Answer**: b) Tables

### **4. Which of the following is a type of JOIN in SQL?**

- a) Inner Join

- b) Outer Join

- c) Left Join

- d) All of the above

**Answer**: d) All of the above

### **5. What is a foreign key in a relational database?**

- a) A unique identifier for a record in a table

- b) A key used to establish a relationship between two tables

- c) A key used to order records in a table


- d) A key that can accept NULL values

**Answer**: b) A key used to establish a relationship between two tables

### **6. In SQL, which of the following commands is used to modify data in a table?**

- a) SELECT

- b) UPDATE

- c) INSERT

- d) DELETE

**Answer**: b) UPDATE

### **7. Which of the following statements is true about a primary key?**

- a) It can have duplicate values.

- b) It must contain unique values.

- c) It can have NULL values.

- d) It is used to index the table.

**Answer**: b) It must contain unique values.

### **8. Which normal form removes partial dependency?**

- a) 1NF

- b) 2NF

- c) 3NF

- d) BCNF
**Answer**: b) 2NF

### **9. The term "ACID" in DBMS stands for:**

- a) Atomicity, Consistency, Isolation, Durability

- b) Attribute, Consistency, Isolation, Durability

- c) Atomicity, Consistency, Isolation, Dependency

- d) None of the above

**Answer**: a) Atomicity, Consistency, Isolation, Durability

### **10. Which of the following is true about a database view?**

- a) A view stores data permanently.

- b) A view is a virtual table created from the result of a query.

- c) A view is the same as a table.

- d) A view can be used only for SELECT operations.

**Answer**: b) A view is a virtual table created from the result of a query.

### **11. In DBMS, which of the following is a property of a transaction?**

- a) It is atomic.

- b) It ensures the integrity of the database.

- c) It is isolated from other transactions.

- d) All of the above


**Answer**: d) All of the above

### **12. Which SQL clause is used to sort the result set in ascending or descending order?**

- a) WHERE

- b) ORDER BY

- c) GROUP BY

- d) HAVING

**Answer**: b) ORDER BY

### **13. Which of the following is used to uniquely identify a record in a relational database?**

- a) Foreign Key

- b) Primary Key

- c) Candidate Key

- d) Composite Key

**Answer**: b) Primary Key

### **14. In which normal form is a relation free from both transitive and partial dependencies?**

- a) 1NF

- b) 2NF

- c) 3NF

- d) BCNF

**Answer**: c) 3NF
### **15. Which of the following is not a DBMS function?**

- a) Data definition

- b) Data manipulation

- c) Data communication

- d) Data security

**Answer**: c) Data communication

### **16. Which of the following types of indexing is used to speed up the search for data?**

- a) B-Tree Index

- b) Hash Index

- c) Bitmap Index

- d) All of the above

**Answer**: d) All of the above

### **17. What is a deadlock in a database system?**

- a) A situation where two transactions are locked and cannot proceed.

- b) A situation where a transaction is in the waiting state forever.

- c) A situation where no transactions are allowed.

- d) A situation where the database crashes.

**Answer**: a) A situation where two transactions are locked and cannot proceed.
### **18. Which of the following is true about a clustered index?**

- a) Data rows are stored in the same order as the index.

- b) The index is stored separately from the data.

- c) Only one clustered index can be created per table.

- d) Both a and c

**Answer**: d) Both a and c

### **19. Which of the following is used to ensure data consistency in a DBMS?**

- a) Backup and recovery

- b) Concurrency control

- c) Transaction management

- d) Indexing

**Answer**: c) Transaction management

### **20. Which of the following is an example of a non-relational database (NoSQL)?**

- a) MySQL

- b) MongoDB

- c) Oracle

- d) SQL Server

**Answer**: b) MongoDB
### **1. Which of the following is NOT a type of database model?**

- a) Hierarchical Model

- b) Network Model

- c) Object-Oriented Model

- d) Linear Model

**Answer**: d) Linear Model

### **2. What is the main purpose of normalization in DBMS?**

- a) To eliminate data redundancy

- b) To improve data retrieval time

- c) To increase data integrity

- d) Both a and c

**Answer**: d) Both a and c

### **3. Which of the following is true about *inner join* in SQL?**

- a) It returns rows from both tables that do not match.

- b) It returns all rows from the left table.

- c) It returns only the rows where there is a match in both tables.

- d) It combines all rows from both tables, matching wherever possible.

**Answer**: c) It returns only the rows where there is a match in both tables.

### **4. Which of the following is NOT a valid SQL aggregate function?**
- a) COUNT

- b) AVG

- c) MAX

- d) CONCAT

**Answer**: d) CONCAT

### **5. Which of the following is a characteristic of a *transaction* in DBMS?**

- a) It is atomic (all-or-nothing).

- b) It can be rolled back if there is an error.

- c) It can have multiple steps.

- d) All of the above

**Answer**: d) All of the above

### **6. What is the purpose of a *foreign key* in a relational database?**

- a) To enforce referential integrity between two tables

- b) To ensure that each record is unique in the database

- c) To define a primary key for a table

- d) To speed up the query performance

**Answer**: a) To enforce referential integrity between two tables

### **7. Which of the following SQL statements is used to remove all records from a table without
deleting the table itself?**

- a) DELETE
- b) TRUNCATE

- c) DROP

- d) REMOVE

**Answer**: b) TRUNCATE

### **8. What is the difference between `WHERE` and `HAVING` clauses in SQL?**

- a) `WHERE` is used to filter rows before aggregation, and `HAVING` is used after aggregation.

- b) `WHERE` can be used with aggregate functions, but `HAVING` cannot.

- c) `WHERE` is used to filter rows after aggregation, and `HAVING` is used before.

- d) Both perform the same function.

**Answer**: a) `WHERE` is used to filter rows before aggregation, and `HAVING` is used after
aggregation.

### **9. What is a *candidate key*?**

- a) A key that uniquely identifies a record in a table

- b) A key with NULL values

- c) A set of one or more attributes that can uniquely identify a record

- d) A non-unique key that can be used for foreign key relationships

**Answer**: c) A set of one or more attributes that can uniquely identify a record

### **10. Which of the following is the most appropriate action if a deadlock occurs in a DBMS?**

- a) Ignore the deadlock and continue processing

- b) Kill one of the transactions involved in the deadlock


- c) Allow both transactions to continue

- d) Execute both transactions simultaneously

**Answer**: b) Kill one of the transactions involved in the deadlock

### **11. Which of the following commands is used to change data in an existing table?**

- a) SELECT

- b) UPDATE

- c) INSERT

- d) ALTER

**Answer**: b) UPDATE

### **12. What is the role of a *DBMS view*?**

- a) A view is a virtual table that does not store data but is used to represent data from one or more
tables.

- b) A view stores data permanently.

- c) A view is a copy of the entire database.

- d) A view automatically updates data in underlying tables.

**Answer**: a) A view is a virtual table that does not store data but is used to represent data from one
or more tables.

### **13. Which of the following is used to ensure the integrity of data in a DBMS?**

- a) Constraints

- b) Normalization
- c) Indexing

- d) Both a and b

**Answer**: d) Both a and b

### **14. What is the primary function of an index in a DBMS?**

- a) To store records in sequential order

- b) To provide a quick lookup for queries

- c) To perform data validation

- d) To enforce data integrity

**Answer**: b) To provide a quick lookup for queries

### **15. Which of the following is NOT a type of *SQL join*?**

- a) LEFT JOIN

- b) RIGHT JOIN

- c) INNER JOIN

- d) EXTERNAL JOIN

**Answer**: d) EXTERNAL JOIN

### **16. Which of the following is the correct order of SQL operations when performing a query?**

- a) SELECT, WHERE, GROUP BY, HAVING, ORDER BY

- b) SELECT, GROUP BY, WHERE, HAVING, ORDER BY

- c) SELECT, HAVING, WHERE, GROUP BY, ORDER BY


- d) SELECT, WHERE, HAVING, GROUP BY, ORDER BY

**Answer**: a) SELECT, WHERE, GROUP BY, HAVING, ORDER BY

### **17. Which type of backup involves backing up only the changes made since the last backup?**

- a) Full Backup

- b) Incremental Backup

- c) Differential Backup

- d) Partial Backup

**Answer**: b) Incremental Backup

### **18. In SQL, which keyword is used to prevent duplicate rows in the result set?**

- a) UNIQUE

- b) DISTINCT

- c) LIMIT

- d) ALL

**Answer**: b) DISTINCT

### **19. In the context of DBMS, what is a *transaction log*?**

- a) A log that stores changes to data as part of a backup strategy

- b) A record of all transactions made in the database

- c) A log used to track errors in SQL queries

- d) A log used to store system errors and failures


**Answer**: b) A record of all transactions made in the database

### **20. Which of the following is true about *BCNF (Boyce-Codd Normal Form)*?**

- a) A relation is in BCNF if it is in 3NF and every determinant is a candidate key.

- b) A relation is in BCNF if it is in 2NF and all non-prime attributes are fully functionally dependent on
the primary key.

- c) A relation is in BCNF if it has no partial dependency.

- d) Both a and b

**Answer**: a) A relation is in BCNF if it is in 3NF and every determinant is a candidate key.

### **1. In a database, which of the following is used to prevent unauthorized access to data?**

- a) Backup

- b) Authentication

- c) Indexing

- d) Normalization

**Answer**: b) Authentication

### **2. Which of the following is used to identify a record uniquely in a table?**

- a) Candidate key

- b) Foreign key

- c) Primary key
- d) Composite key

**Answer**: c) Primary key

### **3. What is a transaction in DBMS?**

- a) A collection of SQL queries executed together

- b) A group of tables in a database

- c) A type of backup method

- d) A set of operations that read and write data in a database

**Answer**: a) A collection of SQL queries executed together

### **4. Which of the following is a property of a *relational database*?**

- a) Data is stored in tables

- b) Data is stored in files

- c) Data is stored in trees

- d) Data is stored as objects

**Answer**: a) Data is stored in tables

### **5. Which of the following is the highest level of normalization?**

- a) 1NF

- b) 2NF

- c) 3NF

- d) BCNF
**Answer**: d) BCNF

### **6. Which of the following is NOT a type of *constraint* in SQL?**

- a) NOT NULL

- b) UNIQUE

- c) DEFAULT

- d) UPDATE

**Answer**: d) UPDATE

### **7. In SQL, which of the following clauses is used to group rows that have the same values in
specified columns?**

- a) GROUP BY

- b) ORDER BY

- c) HAVING

- d) WHERE

**Answer**: a) GROUP BY

### **8. Which of the following is a disadvantage of a *File System* over a *DBMS*?**

- a) Data redundancy

- b) Better data consistency

- c) Less data manipulation capabilities

- d) Both a and c
**Answer**: d) Both a and c

### **9. What is the role of a *Database Administrator (DBA)*?**

- a) To design the database structure

- b) To ensure data security and integrity

- c) To back up data regularly

- d) All of the above

**Answer**: d) All of the above

### **10. Which SQL keyword is used to remove a table from the database?**

- a) DELETE

- b) REMOVE

- c) DROP

- d) TRUNCATE

**Answer**: c) DROP

### **11. Which of the following is true about *indexing* in DBMS?**

- a) Indexes are used to speed up data retrieval.

- b) Indexes are used to enforce data integrity.

- c) Indexes are used to reduce data redundancy.

- d) Both a and b

**Answer**: a) Indexes are used to speed up data retrieval.


### **12. Which of the following is a non-relational (NoSQL) database?**

- a) Oracle

- b) SQL Server

- c) MongoDB

- d) MySQL

**Answer**: c) MongoDB

### **13. In SQL, which clause is used to filter data after applying GROUP BY?**

- a) HAVING

- b) WHERE

- c) ORDER BY

- d) SELECT

**Answer**: a) HAVING

### **14. Which of the following is used to ensure that only one record exists for a primary key?**

- a) Unique constraint

- b) Default constraint

- c) Primary key constraint

- d) Foreign key constraint

**Answer**: c) Primary key constraint


### **15. What is the result of an *INNER JOIN* operation?**

- a) Returns rows where there is a match in both tables

- b) Returns all rows from both tables, whether there is a match or not

- c) Returns rows from the left table, even if there is no match in the right table

- d) Returns only unmatched rows from both tables

**Answer**: a) Returns rows where there is a match in both tables

### **16. Which of the following is used to enforce a relationship between two tables in SQL?**

- a) Foreign key

- b) Primary key

- c) Composite key

- d) Candidate key

**Answer**: a) Foreign key

### **17. Which of the following is used to combine data from two or more tables in SQL?**

- a) UNION

- b) JOIN

- c) SELECT

- d) GROUP BY

**Answer**: b) JOIN

### **18. Which of the following is NOT a type of *indexing* technique?**


- a) B-tree

- b) Hashing

- c) Bitmap indexing

- d) Sorting

**Answer**: d) Sorting

### **19. What does the *SQL SELECT DISTINCT* statement do?**

- a) It returns all the rows, including duplicates.

- b) It returns only unique rows, eliminating duplicates.

- c) It sorts the rows.

- d) It groups the rows based on a condition.

**Answer**: b) It returns only unique rows, eliminating duplicates.

### **20. What is *denormalization* in DBMS?**

- a) The process of reducing data redundancy in a database.

- b) The process of introducing redundancy for faster query performance.

- c) The process of adding new attributes to a table.

- d) The process of removing foreign keys from a table.

**Answer**: b) The process of introducing redundancy for faster query performance.

You might also like