Subtopic Notes

8.2 Database Management Systems

8. Databases

Features of a DBMS:

  • Data management: Data is stored in relational databases, where tables are kept in secondary storage. A data dictionary is also maintained.
    • Data dictionary Includes:
      • A list of all files in the database
      • The number of records in each file
      • Field names and their data types
  • Data modeling: The process of analyzing data objects used in a database and identifying relationships between them.
  • Logical schema: Represents the overall structure of the database, including entities, attributes and relationships
  • Data integrity: When a data block is modified, it is first copied to the user's area and saved back to the database once changes are complete.
  • Data security:
    • Manages password allocation and verification
    • Automatically backs up the database
    • Controls user access by assigning different access rights to individuals or groups

Data change clash solutions:

  • Exclusive Mode: Locks the entire database for one user, impractical for multi-user environments.
  • Table Locking: Locks all records in a table during modification, others can only read but not edit.
  • Record Locking: Locks only the specific record being edited, others can read but not modify.
  • No Locking: Users are notified of simultaneous changes and must resolve conflicts manually.
  • Deadlock: Occurs when two users lock different resources simultaneously, preventing progress. The DBMS detects this and forces one user to abort their task.

Tools in a DBMS:

  • Developer interface: Enables database creation and manipulation using SQL instead of graphical tools.
  • Query processor: Manages high-level queries by parsing, validating, optimizing, and either compiling or interpreting them to generate an efficient query plan.