【正文】
he following actions are recorded in the log: – Ti writes an object: the old value and the new value. ? Log record must go to disk before the changed page! – Ti mits/aborts: a log record indicating this action. ? Log records chained together by Xact id, so it’s easy to undo a specific Xact (., to resolve a deadlock). ? Log is often duplexed and archived on “stable” storage. ? All log related activities (and in fact, all CC related activities such as lock/unlock, dealing with deadlocks etc.) are handled transparently by the DBMS. Database Management Systems, R. Ramakrishnan and J. Gehrke 22 Overview of System Architecture Database Cache Log Buffer Stable Database Stable Log Database Page Database Page Log Entry Log Entry read write begin mit, rollback write fetch flush force Volatile Memory Stable Storage Database Server Database Management Systems, R. Ramakrishnan and J. Gehrke 23 Databases make these folks happy ... ? End users and DBMS vendors ? DB application programmers – . smart webmasters ? Database administrator (DBA) – Designs logical /physical schemas – Handles security and authorization – Data availability, crash recovery – Database tuning as needs evolve Must understand how a DBMS works! Database Management Systems, R. Ramakrishnan and J. Gehrke 24 Structure of a DBMS ? A typical DBMS has a layered architecture. ? The figure does not show the concurrency control and recovery ponents. ? This is one of several possible architectures。 each system has its own variations. Query Optimization and Execution Relational Operators Files and Access Methods Buffer Management Disk Space Management DB These layers must consider concurrency control and recovery Database Management Systems, R. Ramakrishnan and J. Gehrke 25 Summary ? DBMS used to maintain, query large datasets. ? Benefits include recovery from system crashes, concurrent access, quick application development, data integrity and security. ? Levels of abstraction give data independence. ? A DBMS typically has a layered architecture. ? DBAs hold responsible jobs and are wellpaid! ? DBMS Ramp。D is one of the broadest, most exciting areas in CS.