DBMS Question Bank and Study Guide
DBMS Question Bank and Study Guide
Distributed database systems offer benefits such as improved reliability, availability, and performance by spreading data across multiple locations. However, they also present challenges like maintaining data consistency, complex transaction management, increased security risks, and difficulties in achieving effective coordination among distributed nodes .
B-Trees and B+-Trees are data structures used for indexing in databases. B-Trees store keys and data pointers in all nodes, optimizing insertion, deletion, and search operations, while B+-Trees store data pointers only in leaf nodes, which makes sequential access more efficient. B+-Trees typically provide better performance for range queries and full table scans due to their structure .
Query optimization techniques are effective in improving database performance by minimizing computation resources and execution time for queries. They involve selecting efficient execution plans via algorithms that predict costs and use indexes, rewriting queries, or even reordering joins. Ultimately, these techniques allow databases to respond faster to user queries, optimizing system and hardware utilization .
The ACID properties (Atomicity, Consistency, Isolation, Durability) are crucial in ensuring reliable transaction processing in databases. They guarantee that transactions are processed completely and accurately (Atomicity), maintain database integrity (Consistency), operate independently of other transactions (Isolation), and ensure durability of transaction results even in case of failures (Durability).
The three levels of data abstraction in a DBMS, which are the physical, logical, and view levels, allow for the separation of user applications from the physical database. This enhances data management by providing independence between schema layers, simplifying data access, and enabling multiple views of the data tailored to different users' needs .
Primary keys uniquely identify records within a table, ensuring each row is distinct, while candidate keys are potential primary keys identifying unique records. Foreign keys establish relationships between tables, ensuring referential integrity by linking records in different tables. These keys prevent duplicate records and maintain data consistency across the database .
Normalization, especially Boyce-Codd Normal Form (BCNF), reduces redundancy and dependency by organizing data into multiple related tables, which prevents update, insert, and delete anomalies. This organization enhances query efficiency and data integrity, making databases more reliable and faster in processing complex queries .
Serializability ensures that the results of executing transactions concurrently are equivalent to some serial execution of those transactions, thereby upholding consistency. It supports concurrency control by allowing transactions to be interleaved without conflicting, ensuring data integrity during concurrent operations, which is critical in multi-user environments .
A Database Management System (DBMS) offers several advantages over a File Processing System, such as improved data security, reduced data redundancy, data independence, and efficient data management and access. However, it also comes with disadvantages like the high cost of setup and management, complexity, and the need for specialized personnel .
RAID (Redundant Array of Independent Disks) improves data storage and access by using multiple disks to increase data redundancy and performance. It employs techniques like mirroring, bit-level, and block-level striping to distribute data across disks, enhancing read/write speed and providing data protection against hardware failure .