summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authormo khan <mo.khan@gmail.com>2020-02-17 15:18:41 -0700
committermo khan <mo.khan@gmail.com>2020-02-17 15:18:41 -0700
commit6ad08b7ce3bbf18aab53c921684b8f3c89992425 (patch)
tree9e1436897d14a93eb2b3a0ebd64c449ef8a0cb1c /doc
parentde8f58fe301afd1de3c7567fd7a49a6623e6a4be (diff)
Add notes
Diffstat (limited to 'doc')
-rw-r--r--doc/unit-8.md109
1 files changed, 109 insertions, 0 deletions
diff --git a/doc/unit-8.md b/doc/unit-8.md
index ce9eb25..3a27e48 100644
--- a/doc/unit-8.md
+++ b/doc/unit-8.md
@@ -25,3 +25,112 @@ When you have completed this section, you should be able to
* discuss the types of database failures and the process for disaster recovery;
* outline different mechanisms used for concurrency control;
* list and discuss the core functions supported by repository engines.
+
+> Database administration: a technical function that is responsible for physical database design with technical issues,
+such as security enforcement, database performance and backup and recovery.
+
+* analzye and design database
+* select dbms and related tools
+* installing and upgrading the dbms
+* tuning database performance
+* improving database query processing performance
+* managing data security, privacy and integrity
+* performing data backup and recovery
+
+> Open source DBMS: Free DBMS source code software that provides the core functionality of an SQL-compliant DBMS.
+
+
+> Database security: Protection of database data against accidental or intentional loss, destruction, or misuse.
+
+Threats:
+
+* accidental loss: human error, software/hardward caused breaches
+* theft and fraud:
+* loss of privacy or confidentiality:
+* loss of data integrity:
+* loss of availability:
+
+> Authorization rules: controls incorporated in a data management system that restrict access to data and also restrict the actions that people may take when they access data.
+
+Sarbanes-Oxley (SOX)
+
+1. IT change management
+2. Logical access to data
+3. IT operations
+
+> Database recovery: mechanisms for restoring a database quickly and accurately after loss or damage.
+
+Basic recovery facilities:
+
+1. Backup facilities: which provide periodic backup copies of portions of or the entire database.
+2. Journalizing facilities: which maintain an audit trail of transactions and database changes.
+3. A checkpoint facility: by which the DBMS periodically suspends all processing and synchronizes its files and journals to establish a recovery point.
+4. A recovery manager: which allows the DBMS to restore the database to a correct condition and restart processing transactions.
+
+> Backup facility: A DBMS COPY utility that produces a backup copy of an entire database or a subset of a database.
+
+> Journalizing facility: An audit trail of transactions and database changes.
+
+In the event of a failure, a consistent database state can be reestablished using the info
+in the journals with the most recent backup.
+
+1. transaction log: contains a record of the essential data for each transaction that is processed.
+2. database change log: contains before and after images of records that have been modified by transactions.
+
+> Transaction: A discrete unit of work that must be completely processed or not processed at all within a computer system.
+
+> Checkpoint facility: A facility by which a DBMS periodically refuses to accept any new transaction. The system is in a quiet state, and the database and transaction logs are synchronized.
+
+> Recovery Manager: A module of a DBMS that restores the database to a correct condition when a failure occurs and then resumes processing user questions.
+
+
+Recover and restart:
+
+1. Disk Mirroring: Primary + replicas. Promote replica to primary if primary has outage.
+2. Restore/Rerun: reprocess day's transactions against the backup copy of the database or portion of the database.
+
+ACID Transactions
+
+1. Atomic: process all of the transaction or nothing.
+2. Consistent: any db constrants that were true before the trx must be true after the trx.
+3. Isolated: changes to db are not revealed to users until trx is committed.
+4. Durable: changes are permanent.
+
+> Transaction boundaries: The logical beginning and end of a transaction.
+
+Backward Recovery (rollback)
+
+The backout, or undo, of unwanted changes to a database. Before images of the records that have
+been changed are applied to the database, and the database is returned to an earlier state.
+Rollback is used to reverse the changes made by transaction that have been aborted, or terminated abnormally.
+
+Forward Recovery
+
+A technique that starts with an earlier copy of a database then plays the `after images` of
+good transactions.
+
+1. Time consuming logic of reprocessing each transaction does not have to be repeated.
+2. Only th emost recent after images need to be applied.
+
+Types of failure:
+
+1. Aborted transactions: a transaction in progress that terminates abnormally.
+2. Incorrect data: db is updated with incorrect, but valid, data.
+
+Responses to failure:
+
+1. Aborted transaction:
+ * rollback
+ * rollforward/return transactions to state just prior to abort
+2. Incorrect data
+ * Rollback
+ * Reprocess transaction without inaccurate data updates
+ * Compenstating transactions
+3. System failure
+ * switch to duplicate database
+ * rollback
+ * restart from checkpoint
+4. Database destruction
+ * Promote replica to primary
+ * roll forward
+ * reprocess transactions