From d8fa2f34e16936ef93b1a49cc2efbcd097d7cd11 Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 17 Feb 2020 16:08:23 -0700 Subject: Format some text --- assignments/3/README.md | 38 +++++++++++++++++--------------------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/assignments/3/README.md b/assignments/3/README.md index ed4c03a..79ff58b 100644 --- a/assignments/3/README.md +++ b/assignments/3/README.md @@ -41,27 +41,21 @@ The facts to be recorded for each combination of these dimensions are: * 5 years is 60 months * In 60 months there are 3M policy changes +```text Total rows = 1 * 2 * 10 * 1 * 50K * 60 = 60,000,000 rows - -Total rows = 1M offices * (5% of 1M) * 2 members per policy * (5 * 12 months) -= 1M * 50,000 * 2 * 60 -= 6,000,000,000,000 rows - -* 2M members -* 10M items -* X offices -* 1M policies -* 60 periods -* 3M claims (50K claims/month * 60 months) - -= 50K * 60 * 1M * 10M * 2M - +``` +~= 60,000,000 rows **Estimate the total size of the fact table (in bytes), assuming an average of 5 bytes per field.** +```text Total size = 9 columns * 5 bytes * N rows = 45 bytes * N rows += 45 bytes * 60,000,000 rows += 2,700,000,000 bytes +``` +~= 2.7 gigabytes ## Question 2 @@ -80,7 +74,7 @@ recovered so that they can be replayed against the new primary from the time of **The registration office at a university entered an incorrect amount for a student tuition payment. The error was discovered by the financial services department several weeks later.** -Apply a compensating transaction to correct the error. +Apply a compensating transaction to the system in order to correct the error. **The database administrator of a financial institution performed a full database backup, but forgot to activate the journalizing facility. Afterwards, data entry clerks at the financial institution entered transactions for two hours before the database became corrupt. It is discovered that the journalizing facility of the database has not been activated since the backup was made.** @@ -143,13 +137,15 @@ If the applications are read heavy applications then it would make sense to ensu Consider the concurrent execution of the following transactions. -| T1 | T2 | -| -- | -- | -| Read A | Read B | -| Read B | Write A | -| Write C | Read C | +```markdown +| T1 | T2 | +| ------- | ------- | +| Read A | Read B | +| Read B | Write A | +| Write C | Read C | | Write A | Write B | -| Commit | Commit | +| Commit | Commit | +``` **List two problems that may occur from the concurrent execution of these two transactions.** -- cgit v1.2.3