DBMS 2 Marks
DBMS 2 Marks
A database is a structured collection of data organized and stored for efficient retrieval and
manipulation.
14. What is the difference between a clustered index and a non-clustered index?
A clustered index determines the physical order of data in a table, while a non-clustered index
is a separate data structure that provides a logical order for data retrieval.
39. What is a SQL constraint, and why are constraints used in databases?
A SQL constraint is a rule that enforces data integrity. Constraints are used to define limits and
ensure data accuracy.
47. What is the difference between a SQL stored procedure and a SQL function?
A stored procedure is a set of SQL statements that can perform various actions, while a function
returns a single value.
52. What are SQL system views, and how are they used in database management?
SQL system views provide information about database objects and metadata. They are used to
retrieve information about the database schema.
53. What is the purpose of SQL transactions, and how do they ensure data consistency?
SQL transactions ensure data consistency by treating a sequence of statements as a single unit
that either executes successfully or not at all.
55. What is the SQL concept of data warehousing, and why is it important?
Data warehousing involves the collection, storage, and management of data from various
sources for business intelligence and reporting purposes.
56. Explain the purpose of SQL primary keys and their role in ensuring data integrity.
SQL primary keys are unique identifiers for tables and ensure data integrity by preventing
duplicate rows.
60. What is the SQL concept of data integrity constraints, and why are they essential?
SQL data integrity constraints (e.g., NOT NULL, UNIQUE, CHECK) ensure the accuracy,
reliability, and consistency of data in a database.
61. Define SQL triggers and describe situations where they are used.
SQL triggers are sets of actions executed automatically when specific database events (e.g.,
INSERT, UPDATE, DELETE) occur. They are used to maintain data integrity and log changes.
62. What is SQL data mining, and how is it used for discovering patterns in data?
SQL data mining is the process of discovering patterns, trends, and knowledge in large
databases using various data mining techniques.
63. Explain the SQL concept of referential integrity, and how is it enforced?
Referential integrity ensures that relationships between tables are maintained and that foreign
keys correspond to primary keys. It's enforced using constraints and triggers.
64. Differentiate between SQL INNER JOIN and SQL OUTER JOIN, and provide examples of
their usage.
SQL INNER JOIN returns only matching rows from both tables, while SQL OUTER JOIN returns
matching and non-matching rows. For example, you can use INNER JOIN to retrieve orders with
associated customers and LEFT JOIN to get customers with or without orders.
65. What are SQL stored procedures, and why are they used in database management?
SQL stored procedures are precompiled sets of SQL statements. They are used to encapsulate
logic for data manipulation and ensure consistent and secure execution.
66. Explain the concept of database triggers in SQL and provide examples of their use cases.
Database triggers are sets of actions that automatically execute when specific database events
occur. For example, you can create a trigger to log changes made to a table or enforce business
rules.
67. What is the SQL concept of indexing, and why is it important in database management?
SQL indexing involves creating data structures to improve data retrieval speed. It's important
for faster query execution and efficient data access.
69. Explain the SQL concept of referential integrity and its role in maintaining database
relationships.
Referential integrity ensures that relationships between tables are maintained, and foreign keys
correspond to primary keys. It's enforced using constraints to prevent actions that would
compromise data integrity.
70. What is the role of the Database Administrator (DBA) in database management, and what
are their responsibilities?
A DBA is responsible for managing, configuring, and maintaining the database system.
Responsibilities include database design, security, performance tuning, and backup and
recovery.
71. What is a database management system (DBMS), and why is it important in the field of
computer science?
A DBMS is a software system that enables the creation, storage, retrieval, and management of
data in databases. It's essential for data organization and efficient data access.
74. Define database normalization and explain its importance in database design.
Database normalization is the process of organizing data to minimize redundancy and improve
data integrity. It ensures that data is stored efficiently and prevents data anomalies.
76. What is the primary key in a relational database, and why is it important?
The primary key is a unique identifier for each record in a table. It's crucial for data integrity, as
it enforces data uniqueness and ensures data consistency.
77. What are database constraints, and how do they help maintain data integrity?
Database constraints are rules that restrict the values that can be entered into a database. They
help enforce data integrity by preventing invalid or inconsistent data.
78. Explain the differences between SQL DML (Data Manipulation Language) and SQL DDL
(Data Definition Language).
SQL DML is used for manipulating data (e.g., SELECT, INSERT, UPDATE, DELETE), while SQL DDL
is used for defining database structure (e.g., CREATE, ALTER, DROP).
79. What is the purpose of the SQL SELECT statement, and how is it used to retrieve data from
a database?
The SQL SELECT statement is used to query and retrieve data from one or more tables in a
database. It allows you to specify the columns you want to retrieve, conditions for filtering, and
sorting.
80. Explain the concept of SQL indexes and their significance in query optimization.
SQL indexes are data structures that improve data retrieval speed. They reduce the time
required to search for specific data and enhance query performance.
82. What is the purpose of the SQL WHERE clause, and how is it used in SELECT statements?
The SQL WHERE clause is used to filter rows from a table based on a specified condition. It is
used with SELECT statements to retrieve data that meets specific criteria.
84. What is database normalization, and how is it achieved through different normal forms?
Database normalization is the process of organizing data to minimize redundancy and improve
data integrity. It is achieved by applying a series of normal forms (e.g., 1NF, 2NF, 3NF).
85. What is the purpose of SQL JOIN operations, and how do INNER JOIN and LEFT JOIN
differ?
SQL JOIN operations combine data from two or more tables based on a related column. INNER
JOIN returns only matching rows, while LEFT JOIN returns matching and non-matching rows.
87. What are the different types of SQL constraints, and how are they used in database
design?
SQL constraints include NOT NULL, UNIQUE, PRIMARY KEY, FOREIGN KEY, CHECK, and
DEFAULT. They enforce data rules and integrity in a database.
88. Define SQL triggers and provide examples of situations where they are used.
SQL triggers are sets of actions that automatically execute when specific database events occur
(e.g., INSERT, UPDATE, DELETE). They are used to maintain data integrity or log changes.
89. What is SQL data warehousing, and how does it support business intelligence (BI) and
analytics?
SQL data warehousing involves collecting, storing, and managing data from various sources for
BI and analytical purposes. It provides a central repository for analyzing data.
90. Explain the purpose of SQL views and provide examples of their practical use.
SQL views are virtual tables created from one or more base tables. They are used to simplify
complex queries, control access to data, and provide data security.
91. Differentiate between OLTP (Online Transaction Processing) and OLAP (Online Analytical
Processing) databases.
OLTP databases are used for routine transactional operations, while OLAP databases are
designed for complex analytical queries and reporting.
92. What is the role of a Database Administrator (DBA) in database management, and what
are their core responsibilities?
A DBA is responsible for the design, security, performance, and maintenance of a database
system. Responsibilities include backup and recovery, user access management, and query
optimization.
93. Explain the importance of query optimization in a relational database and provide
examples of optimization techniques.
Query optimization aims to improve the efficiency of SQL queries. Techniques include indexing,
choosing the right JOIN type, and using the WHERE clause effectively.
94. What is the purpose of SQL transactions, and how do they ensure data consistency in a
database?
SQL transactions group multiple database operations into a single unit. They ensure data
consistency by allowing changes to be either fully applied or fully rolled back.
95. Define the terms "data warehouse" and "data mart," and explain their differences.
A data warehouse is a centralized repository for storing large volumes of data, while a data
mart is a subset of a data warehouse tailored for specific user groups or departments.
96. Explain the concept of "big data" and discuss the challenges and opportunities associated
with managing and analyzing big data.
Big data refers to large and complex datasets. Challenges include data storage and processing,
while opportunities involve deriving insights from vast amounts of information.
97. Describe the benefits and use cases of NoSQL databases compared to traditional
relational databases.
NoSQL databases provide flexibility and scalability, making them suitable for applications with
unstructured or rapidly changing data, such as social media and IoT.
98. What is the purpose of SQL stored procedures, and how do they differ from SQL
functions?
SQL stored procedures are sets of SQL statements that can be executed on demand. Unlike
functions, they may not return values and can perform various actions.
99. Explain the advantages of using an E-R diagram (Entity-Relationship diagram) in the
database design process.
E-R diagrams help visualize data models, relationships, and entities. They aid in database
design by providing a clear representation of data structures.
100. Discuss the concept of data replication in a database and its role in ensuring data
availability and fault tolerance.
Data replication involves copying data to multiple locations. It ensures data availability and
provides fault tolerance in case of server failures or data loss.