Question For DBMS With Solutions
Question For DBMS With Solutions
Simple: What is a Database Management System (DBMS), and what is its primary purpose in computing?
Intermediate: How does a DBMS differ from traditional file-based systems in terms of data
management?
Advanced: Discuss the evolution of DBMS and its role in modern data-centric applications.
Importance of DBMS:
Simple: Why is a DBMS important in the context of data storage and retrieval?
Intermediate: Discuss the significance of data security and privacy in a DBMS.
Advanced: Explain how a DBMS contributes to data independence and reduces data redundancy.
Application of DBMS:
Simple: Provide an example of an application where a DBMS is commonly used.
Intermediate: How does a DBMS support decision-making processes in businesses?
Advanced: Discuss the role of a DBMS in data warehousing and business intelligence.
Database Languages:
Simple: What are Data Definition Language (DDL) and Data Manipulation Language (DML)?
Intermediate: Explain the role of Query by Example (QBE) in database languages.
Advanced: Discuss the features and applications of Data Query Language (DQL) in a DBMS.
Database Models:
Simple: Differentiate between the hierarchical and network database models.
Intermediate: Discuss the key characteristics of the Relational Database Model.
Advanced: Explore the concepts and principles of the Object-Based Data Model.
Relational Algebra Operations: Select, Project, Cartesian Product, Union, Set Difference, Natural Join,
Outer Join:
Simple: Define the purpose of the "Select" operation in relational algebra.
Intermediate: Explain how the "Cartesian Product" operation works and its potential applications.
Advanced: Discuss the differences between "Natural Join" and "Outer Join" in relational algebra.
Manipulating Data:
Simple: What is the purpose of the UPDATE statement in SQL, and how is data manipulated using it?
Intermediate: Explain the process of removing rows from a table using the DELETE statement.
Advanced: Discuss the considerations and precautions when updating or deleting data in a database.
Transaction Isolation:
Simple: Define transaction isolation and its significance in a multi-user database environment.
Intermediate: Explain the challenges and benefits of maintaining high isolation levels in transactions.
Advanced: Discuss strategies for achieving strong isolation while balancing system performance.
Serializability:
Simple: What is serializability in the context of database transactions?
Intermediate: Discuss the importance of serializability for maintaining data consistency.
Advanced: How can non-serializable schedules lead to data anomalies, and how are they addressed?
Deadlock Handling:
Simple: Define a deadlock in the context of database transactions.
Intermediate: How are deadlocks detected in a lock-based protocol?
Advanced: Discuss strategies for handling and preventing deadlocks in a database system.
Multiple Granularity:
Simple: Explain the concept of multiple granularity in the context of locks.
Intermediate: How does multiple granularity help in managing locks more efficiently?
Advanced: Discuss potential challenges and benefits of implementing multiple granularity.
Time-Based Protocol:
Simple: What is a time-based protocol in the context of transaction management?
Intermediate: How does a timeout-based approach contribute to deadlock prevention?
Advanced: Discuss scenarios where a time-based protocol may be more effective than other deadlock
prevention strategies.
Intermediate Queries:
Create a SQL query to display the unique values in the "category" column of a table named "Products."
Write a query to calculate the average price of products in the "Electronics" category.
Retrieve the top 5 highest-priced products from the "Products" table.
Advanced Queries:
Develop a query to find customers who have placed orders with a total amount greater than $1000.
Write a SQL query to identify products that are frequently purchased together based on order details.
Create a query to update the "quantity" column in the "Inventory" table after a product is sold.
Data Manipulation:
Write a query to insert a new product into the "Products" table.
Develop a query to update the prices of all products in the "Electronics" category by 10%.
Create a query to delete orders that were placed more than one year ago.
Performance Optimization:
How can you optimize a query that takes a long time to execute on a large dataset?
Write a query that efficiently retrieves the latest transaction for each customer from a "Transactions"
table.