Dbms Question Bank-5 Units
Dbms Question Bank-5 Units
Question Bank
Year/Semester:II/ IV Department: CSE Unit:I,II,III,IV,V
Subject Code/Title : CS3492/ DBMS Section: Part A/B/C
Date:22.6.2024
Faculty Name:Mr.Sheik thariq,AP/CSE
UNIT I RELATIONAL DATABASES : Purpose of Database System – Views of data – Data Models –
Database System Architecture – Introduction to relational databases – Relational Model – Keys
– Relational Algebra – SQL fundamentals – Advanced SQL features – Embedded SQL– Dynamic
SQL
Real world entity Relation-based tables Isolation of data and application Less redundancy
Consistency Query Language ACID Properties Multiuser and concurrent Access Multiple
Views Security
2.What is Data Definition Language? Give example. (NOV 2016, APR 2018)
Data Definition Language (DDL) – specifies constructs for schema definition, relation definition,
integrity constraints, views and schema modification.
Data Definition Language (DDL) is a standard for commands that define the different structures in a
database. DDL statements create, modify, and remove database objects such as tables, indexes, and
users. Common DDL statements are CREATE, ALTER, and DROP
3. Write the Characteristics that distinguish the Database approach with the File-based Approach?
(MAY 2015, Nov 2019)
Database Approach File-Based Approach A database System contains not only the database itseld but
also the descriptions of data structure and constraints ( meta-data). Data definition is a part of
application programs In the database approach, the data structure is stored in the system catalog not in
the programs. The structure of the data files is defined in the application programs so if a user wants to
change the structure of a file, all the programs that access that file might need to be changed as well. A
multiuser database system allows multiple user access to the database at the same time. They have
concurrency control strategies and integrity checks for several user access. Same data is managed more
than once this leads to redundancy and inconsistency.
Data redundancy and inconsistency Difficulty in accessing data Data isolation Marinating
Integrity Atomicity Problems Concurrent Access Anomalies
6. What is a weak entity? Give Example. (NOV 2016, APR 2018)
Weak entity set: entity set that do not have key attribute of their own are called weak entity sets In a
relational database, a weak entity is an entity that cannot be uniquely identified by its attributes alone;
therefore, it must use a foreign key in conjunction with its attributes to create a primary key. Examples.
The existence of rooms is entirely depended on the existence of a hotel.
In database systems, atomicity (or atomicness; from Greek a-tomos, undividable) is one of the ACID
transaction properties. In an atomic transaction, a series of database operations either all occur, or
nothing occurs.
Simple attributes are atomic values, which cannot be divided further. For example, a student's phone
number is an atomic value of 10 digits. A composite attribute consists of a group of values from more
than one domain. For example, the Address attribute consists of several domains such as house number,
street number, city, country, etc.
A query is a statement requesting the retrieval of information. The portion of DML that involves
information retrieval is called a query language.
10. Define database management system? List various applications of DBMS? (MAY 2019)
Database management system (DBMS) is a collection of interrelated data and a set of programs to
access those data. a) Banking b) Airlines c) Universities d) Credit card transactions e) Tele
communication f) Finance g) Sales h) Manufacturing i) Human resources
SQL commands are divided in to the following categories: 1. Data definition language 2. Data
manipulation language 3. Data Query language 4. Data control language 5. Data administration
statements 6. Transaction control statements.
Triggers are statements that are executed automatically by the system as the side effect of a
modification to the database. In a DBMS, a trigger is a SQL procedure that initiates an action (i.e., fires
an action) when an event (INSERT, DELETE or UPDATE) occurs. ... Stored procedures are explicitly
executed by invoking a CALL to the procedure while triggers are implicitly executed.
14.State the difference between security and integrity? (NOV 2013)
Data integrity = making sure the data is correct and not corruptData security = making sure only the
people who should have access to the data are the only ones who can access the data. also, keeping
straight who can read the data and who can write data. Pure integrity of data refers to the property
which determines that data, once stored, has not been altered in an unauthorised way -- either by a
person, or by the malfunctioning of hardware.
Tuple variables are used for comparing two tuples in the same relation. The tuple variables are defined
in the from clause by way of the as clause.
PART –B
1. Explain select, project and Cartesian product operations in relational algebra with an example?
(NOV 2016, APR 2018)
2. 2. Briefly explain about views of data? (JUN 2016)
3. 3. With the help of a neat block diagram explain the basic architecture of a database
management system? (NOV 2015) ( or) Briefly explain about Database System Architecture?
(JUN 2016) (or) Explain the overall architecture of the database system in detail? (MAY 2017)
(OR) State and explain the architecture of DBMS? (NOV 2017, Nov 2019)
4. What are the advantages of having a centralized control of data? Illustrate your answer with
suitable example? (NOV 2015)
5. Write Short notes on i) Data model and its types (Nov 2014) (or) Explain the different groups of
data models with suitable examples? (Apr 2019)
UNIT 2 -2MARK
PART-B
1. Construct an E-R diagram for a car insurance company whose customers own one or more cars
each. Each car has associated with it zero to any number of recorded accidents. Each insurance
policy covers one or more cars, and has one or more premium payments associated with it. Each
payment is for a particular period of time and has an associated due date, and the date when
the payment was received? (NOV 2016, NOV 2018
2. 2.Discuss the correspondence between the ER model construct and the relational model
constructs. Show how each ER model construct can be mapped to the relational model. Discuss
the option for mapping EER model construct? (MAY 2017), (NOV 2019)
3. 3.Explain in detail about Functional Dependencies? (NOV 2018)
4. 5,A car rental company maintains a database for all vehicles in its current fleet. For all vehicles,
it includes the vehicle identification number, license number, manufacturer, model, date of
purchase and color. Special data are included for certain types of vehicles. Trucks: cargo capacity
Sports car: horsepower, renter age requirement Vans: number of passengers Off-road vehicle:
ground clearance,drivetrain(four or two-wheeler drive) Construct an ER model for the car rental
company database.(NOV 2015)
5. Explain first normal form, second normal form, third normal form and BCNF with an example?
(NOV 2016, Nov 2019)
6. Design and draw an E-R diagram for university database? (Nov 2019)
7. BCNF with an example? (NOV 2016, Nov 2019)
UNIT-III
Transaction Concepts – ACID Properties – Schedules – Serializability – Concurrency Control – Need for
Concurrency – Locking Protocols – Two Phase Locking – Deadlock – Transaction Recovery – Save Points –
Isolation Levels – SQL Facilities for Concurrency and Recovery.
1. Define the ACID properties in the context of database transactions. ACID stands for
Atomicity, Consistency, Isolation, and Durability. These properties ensure that database
transactions are reliable and maintain data integrity.
2. Explain the significance of each ACID property in ensuring transactional reliability.
Atomicity ensures that a transaction is treated as a single unit, either fully
completed or fully aborted, to prevent partial updates that could leave the
database in an inconsistent state.
Consistency ensures that the database transitions from one valid state to another,
preserving data integrity and adhering to defined constraints and rules.
Isolation ensures that concurrent transactions do not interfere with each other,
maintaining transactional integrity and preventing data corruption.
Durability guarantees that once a transaction is committed, its effects are
permanently stored in the database, even in the event of system failures.
3. What does the acronym ACID stand for, and why are these properties important in
database transactions? ACID stands for Atomicity, Consistency, Isolation, and
Durability. These properties are important in database transactions to ensure reliability,
data integrity, and concurrency control, thereby maintaining the overall consistency of
the database.
4. Discuss the role of atomicity in maintaining database consistency during
transactions. Atomicity ensures that either all operations of a transaction are
successfully completed and committed, or none of them are, preventing partial updates
that could leave the database in an inconsistent state.
5. Describe how consistency is enforced in database transactions. Consistency is
enforced by adhering to predefined constraints, rules, and integrity constraints during
transaction execution, ensuring that the database transitions from one valid state to
another without violating its integrity.
6. Explain the concept of isolation and its importance in transaction management.
Isolation ensures that concurrent transactions do not interfere with each other's
execution, maintaining transactional integrity and preventing data corruption or
inconsistency.
7. How does the isolation level of a transaction affect its concurrency control and
data consistency? The isolation level determines the degree of isolation between
concurrent transactions. Higher isolation levels provide stronger guarantees of data
consistency but may impact concurrency and performance due to increased locking and
resource contention.
8. Define the durability property of transactions and its implications for data
integrity. Durability ensures that once a transaction is committed, its effects are
permanently stored in the database and cannot be undone, even in the event of system
failures. This property ensures data integrity and reliability.
9. Discuss the challenges associated with achieving durability in distributed
transaction systems. Challenges in achieving durability in distributed transaction
systems include ensuring that all participating nodes agree on the outcome of a
transaction and coordinating the storage of committed data across multiple locations to
withstand failures without data loss.
10. What is a schedule in the context of database transactions, and why is it
important? A schedule is a chronological order of transactions or operations performed
on a database. It is important because it determines the concurrency and execution
order of transactions, impacting data consistency and integrity.
11. Explain the difference between a serial schedule and a concurrent schedule. A serial
schedule executes transactions sequentially, one after another, while a concurrent
schedule allows multiple transactions to execute simultaneously, potentially interleaving
their operations.
12. Define serializability and its significance in ensuring transaction correctness.
Serializability ensures that the outcome of concurrent executions of transactions is
equivalent to a serial execution order, maintaining correctness and consistency despite
concurrent execution.
13. Describe the criteria for determining whether a schedule is serializable. A schedule
is serializable if it produces the same final state of the database as some serial execution
of the same transactions, preserving the transaction order and respecting transaction
dependencies.
14. How does transaction support in SQL facilitate the management of database
transactions? Transaction support in SQL allows users to initiate, commit, or rollback
transactions using commands such as BEGIN TRANSACTION, COMMIT, and ROLLBACK,
providing control over transactional behavior and ensuring data consistency.
15. Provide examples of SQL commands or statements used to initiate, commit, or
rollback transactions. Examples of SQL commands for transaction management:
BEGIN TRANSACTION: Initiates a new transaction.
COMMIT: Commits the current transaction, making its changes permanent.
ROLLBACK: Rolls back the current transaction, undoing its changes and restoring
the database to its previous state.
PART B
1.Briefly explain about Two phase commit and three phase commit protocols. (Nov’ 2014, May 2015 &
May 2016)
7. List all possible sequences of states through which a transaction may pass? Explain why each state
transition may occur? (May 2018)
8.Explain with an example the properties that must be satisfied by a transaction? (May 2018, May 2019,
Nov 2019)
9. Explain the concepts of concurrent execution in Transaction processing system. (Nov/Dec 2014)
12. What is deadlock? How does it occur? How transactions be written to (i) Avoid deadlock (ii)
guarantee correct execution. Illustrate with suitable example. (Nov’ 2014 Nov’2015 & Nov’2016)
UNIT IV
RAID:
File Organization:
Ordered Indices:
Static Hashing:
Dynamic Hashing:
Question: What are the main phases of query processing in a database system?
o Answer: The main phases of query processing are parsing, optimization, and
execution.
Question: What is the purpose of query optimization?
o Answer: The purpose of query optimization is to select the most efficient
execution plan for a given query to minimize resource usage and execution time.
Distributed Databases: Architecture, Data Storage, Transaction Processing, Query processing and
optimization – NOSQL Databases: Introduction – CAP Theorem – Document Based systems – Key value
Stores – Column Based Systems – Graph Databases. Database Security: Security issues – Access control
based on privileges – Role Based access control – SQL Injection – Statistical Database security – Flow
control – Encryption and Public Key infrastructures – Challenges
Data replication involves storing copies of the same data on multiple machines to improve data
availability and reliability.
Transaction processing in distributed databases ensures that database transactions are processed
reliably and ensure data consistency across multiple locations.
Database Security
12. Q: What is access control based on privileges? A: Access control based on privileges
restricts database access and operations based on user roles and their associated
permissions.
13. Q: Explain role-based access control (RBAC). A: RBAC is a security mechanism that
assigns permissions to roles rather than individual users, and users are then assigned
roles, simplifying permission management.
14. Q: What is SQL injection? A: SQL injection is a type of cyber attack where malicious
SQL code is inserted into a query to manipulate the database, potentially leading to
unauthorized data access or corruption.
15. Q: Define statistical database security. A: Statistical database security involves
techniques to protect sensitive information in databases that are used for statistical
analysis, ensuring individual data privacy.
16. Q: What is flow control in database security? A: Flow control mechanisms prevent
unauthorized information flow within a database, ensuring that sensitive data is not
transmitted to unauthorized users or systems.
17. Q: How is encryption used in database security? A: Encryption converts data into a
coded format that is unreadable without a decryption key, protecting data from
unauthorized access during storage and transmission.
18. Q: What is Public Key Infrastructure (PKI)? A: PKI is a framework for managing digital
keys and certificates, providing secure encryption and authentication for electronic
communications and data exchange.
19. Q: What is a major challenge in database security? A: A major challenge in database
security is balancing the need for data accessibility with stringent security measures to
protect against unauthorized access and breaches.
20. Q: How does role-based access control enhance database security? A: RBAC enhances
database security by simplifying the assignment of permissions through roles, reducing
the risk of granting excessive privileges to users and making it easier to manage and audit
access controls.
PART-B
1. Describe the architecture of distributed databases, including the types and key
components. Discuss the advantages and challenges associated with implementing such
systems.
2. Explain the various data storage techniques used in distributed databases. How do these
techniques impact data retrieval and consistency?
3. Discuss the process of transaction processing in distributed databases. How are ACID
properties maintained across distributed systems?
4. Elaborate on query processing and optimization in distributed databases. What
strategies are used to enhance query performance across multiple nodes?
5. Provide an introduction to NoSQL databases. Compare and contrast the four main types:
Document-based systems, Key-value stores, Column-based systems, and Graph
databases.
6. Discuss the CAP theorem and its implications for NoSQL databases. How do different
NoSQL databases balance the trade-offs between Consistency, Availability, and Partition
Tolerance?
7. Identify and discuss the major security issues faced by modern databases. How do
access control mechanisms like privilege-based access and role-based access control
(RBAC) enhance database security?
8. Explain SQL injection attacks and discuss various techniques to prevent them. How do
prepared statements and parameterized queries help in mitigating these attacks?
9. Describe the concept of statistical database security. What techniques are employed to
protect sensitive data in databases used for statistical analysis?
10. Discuss the role of encryption and Public Key Infrastructure (PKI) in database security.
What are the challenges associated with implementing these technologies in a
distributed database environment?