ib cs - Apr 14, 14:50
hl with database
🏆 Free — No Login Required
2. A distributed OLTP system uses two-phase commit (2PC). The transaction manager logs , receives unanimous votes , then crashes before logging . After restart the recovery procedure reads the log. Which log record combination allows the TM to decide the fate of T without remote communication and what is the resulting terminal decision?
3. A B+-tree index uses 8 KiB pages, 12-byte pointers, 8-byte keys, and a 69 % fill-factor. Ignoring headers, what is the maximum number of keys that can be stored in a non-root leaf node and how many child page pointers accompany them?
4. Consider the schedule S = r1(x), w2(x), r1(y), w3(y), c3, c2, c1. Which of the following is the minimal conflict-equivalent serial order and does it avoid cascading aborts?
Written response required.
5. A query performs a hash-join on relations R (2 M pages) and S (3 M pages) with a 40 % selective predicate on S. Memory is 102 pages. Using the hybrid grace-hash algorithm, what is the minimum number of passes required to complete the join and how many partitions are created in the first pass?
Written response required.
6. The SQL statement SELECT * FROM T WHERE a=5 ORDER BY b LIMIT 10 can use either (a) a clustered B+-tree on (a,b) or (b) a hash index on a plus an in-memory sort. Table T occupies 50 k pages and 100 tuples match a=5. Which index yields the fewest page I/Os and what is that number?
Written response required.
7. A DBA runs VACUUM FULL on PostgreSQL which rewrites the entire heap and rebuilds all indexes. Afterwards the auto-vacuum daemon still performs routine vacuums. Which statistics are retained across VACUUM FULL and which are reset, affecting the planner’s choice?
Written response required.
8. In MongoDB a collection has a compound index {a:1,b:-1}. A query db.c.find({a:{$gt:3},b:{$lt:7}}).sort({a:1,b:-1}) is executed. Which of the following describes the index intersection plan and its sorting behaviour?
Written response required.
9. A multi-version system uses timestamp ordering with MVTO. Transaction T (TS=50) wants to read object O whose current version is WTS=60 and RTS=55. What action does MVTO take and what timestamp is assigned to the new read version?
Written response required.
10. A data warehouse uses bitmap join indexes: BJI1 on (d.year, f.product) and BJI2 on (d.quarter, f.store). Query GROUP BY d.year, d.quarter needs to combine both indexes. Which bitmap operation is required and what is the resulting compression ratio compared to materializing the join?
Written response required.