Practice
Solution
Step 1: Identify common attributes
R1 and R2 share attribute B.Step 2: Check if common attribute is a key in either relation
B is a key in R2 (since B -> C), so lossless join condition holds.Step 3: Check dependency preservation
A -> B is in R1, B -> C is in R2, so all dependencies are preserved.Final Answer:
Option A -> Option AQuick Check:
The decomposition is lossless because A is a key in R1; it does not preserve B -> C since B is not a key in R1 incorrectly states lossless join depends on A in R1; The decomposition is not lossless because the common attribute B is not a key in either relation; it preserves all dependencies wrongly claims lossless join fails; The decomposition is lossless and preserves dependencies only if A is a key for the entire relation adds unnecessary condition.
- Assuming common attribute must be key in both relations
- Confusing which relation must contain which FD
- Believing lossless join requires the original key in all decomposed relations
Solution
Step 1: Aggregate total sales per product in Electronics
Product P1: 100, Product P2: 150Step 2: Rank products by total_sales DESC within Electronics
P2 has higher sales (150) than P1 (100), so P2 rank=1, P1 rank=2.Final Answer:
Option A -> Option AQuick Check:
P2 is top-selling in Electronics -> rank 1 [OK]
- Confusing rank with dense_rank or skipping partitioning
Solution
Step 1: Recall B+ Tree data storage rules
Data records are stored only in leaf nodes; internal nodes store keys for navigation.Step 2: Verify leaf node linkage
Leaf nodes are linked sequentially to optimize range queries.Step 3: Understand insertion/deletion effects
Splitting and merging can occur in both leaf and internal nodes to maintain tree properties.Step 4: Identify incorrect statement
Data records can be stored in both internal and leaf nodes to speed up point queries. incorrectly states data records are stored in internal nodes, which contradicts B+ Tree design.Final Answer:
Option C -> Option CQuick Check:
Data only in leaves; internal nodes are index-only.
- Believing data can be stored in internal nodes
- Confusing B+ Tree with B-Tree data placement
- Ignoring leaf node linkage importance
Solution
Step 1: Understand hash index key distribution
Hash indexes distribute keys across buckets based on hash values, losing key order.Step 2: Range query implications
Because keys are unordered, range queries require scanning all buckets or the entire table.Step 3: Evaluate distractors
Hash indexes can efficiently support range queries by scanning only relevant buckets, resulting in O(log n) time. incorrectly claims efficient bucket scanning for ranges. Hash indexes perform better than B+ trees for range queries because hashing reduces disk I/O. wrongly states hash indexes outperform B+ trees for range queries. Hash indexes can be modified to support range queries by sorting keys within each bucket. suggests sorting within buckets, which is not standard and does not solve global ordering.Final Answer:
Option A -> Option AQuick Check:
Hash index + range query -> full scan needed [OK]
- Assuming hash buckets are ordered
- Believing hash indexes reduce I/O for range queries
- Thinking sorting within buckets enables global range queries
Solution
Step 1: Understand Armstrong's Axioms nature
They are inference rules based on attribute sets and dependencies, independent of actual data values.Step 2: Analyze NULL impact
NULLs affect data instance semantics but do not change logical inference of dependencies.Step 3: Evaluate options
A is incorrect; axioms do not assume non-nullability.
B is correct; inference is logical and data-agnostic.
C is incorrect; augmentation is a logical rule, not data-dependent.
D is incorrect; transitivity applies regardless of NULL presence.Final Answer:
Option B -> Option BQuick Check:
Armstrong's Axioms operate on schema-level dependencies, not data values.
- Confusing logical inference with data instance behavior
- Assuming NULLs break functional dependencies at schema level
- Believing augmentation or transitivity depend on data completeness
