diff options
| author | mo khan <mo.khan@gmail.com> | 2020-04-30 14:40:18 -0600 |
|---|---|---|
| committer | mo khan <mo.khan@gmail.com> | 2020-04-30 14:40:18 -0600 |
| commit | d7832fbb540394a6e5d12b13583ba8a8005e91a2 (patch) | |
| tree | 19bfcfd98ac0fdeb5c0a23c4724b3c822a3d1fa9 | |
| parent | 4be3f841402da6b7666481da6ed499415058a21d (diff) | |
Finish the rest of the practice exam
| -rw-r--r-- | assignments/exam/README.md | 66 |
1 files changed, 66 insertions, 0 deletions
diff --git a/assignments/exam/README.md b/assignments/exam/README.md index fdda0dc..02fefeb 100644 --- a/assignments/exam/README.md +++ b/assignments/exam/README.md @@ -277,3 +277,69 @@ b. Define indexes on selected attributes to speed up your query. Justify your se CREATE INDEX ON "Travel-Agent" (name); -- Joining on travel_agent.name CREATE INDEX ON Transaction (cust_name); -- filtering by cust_name ``` + +## 5 + +Suggest an appropriate recovery technique for each of the following situations. + +a. You were working from home and updating a database at work when the transaction was aborted. + +Rollback the transaction and try again. + +b. A customer service representative entered an incorrect data price for a customer transaction. +Several weeks after the accounting department has processed the transaction, +the customer returned and discovered the mistake. + +Add a new compensating transaction to fix the mistake. + + +## 6 + +Contrast two-tier architecture with three-tier architecture. + +Two tier architectures + +|--------| +| Server | * storage logic +|--------| +| Client | * processing logic +| | * presentation logic +|--------| + +|--------| +| Server | * storage logic +| | * processing logic +|--------| +| Client | * presentation logic +|--------| + + +3 tier architecture + +|--------| +| db | * storage logic +|--------| +| app | * processing logic +|--------| +| client | * presentation logic +|--------| + +## 7 + +a. Briefly contrast transient data with periodic data in data warehousing. + +> Transient data: in which changes to existing records are written over previous records, thus destroying the previous data content. +> Periodic data: data that are never physically altered or deleted once they have been added to the store. + +b. Briefly discuss the characteristics of a surrogate key, as used in a data warehouse or data mart. + +Surrogate Key + +Every key used to join the fact table with a dimension table should be a surrogate (system assigned) key. + +Why? + +* Business keys change, often slowly, over time and we need to remember old and new business key values for the same business object. +* Using a surrogate key also allows us to keep track of different non-key attribute values for the same product production key with several surrogate keys, each for the different package sizes. +* Surrogate keys are often simpler and shorter +* Surrogate keys can be of the same length and format for all keys |
