Bird
0
0

You want to store user preferences as flexible key-value pairs and also generate unique IDs for each user. Which combination of extensions should you enable?

hard📝 Application Q8 of 15
PostgreSQL - Advanced Features
You want to store user preferences as flexible key-value pairs and also generate unique IDs for each user. Which combination of extensions should you enable?
AEnable hstore for key-value storage and uuid-ossp for UUID generation
BEnable pg_trgm for key-value storage and hstore for UUIDs
CEnable uuid-ossp for key-value storage and pg_trgm for UUIDs
DEnable pg_trgm for both key-value storage and UUID generation
Step-by-Step Solution
Solution:
  1. Step 1: Match extensions to features

    hstore stores key-value pairs; uuid-ossp generates UUIDs.
  2. Step 2: Eliminate incorrect pairs

    pg_trgm is for text similarity, not key-value or UUIDs.
  3. Final Answer:

    Enable hstore for key-value storage and uuid-ossp for UUID generation -> Option A
  4. Quick Check:

    hstore + uuid-ossp = key-value + UUID [OK]
Quick Trick: hstore = key-value, uuid-ossp = UUIDs [OK]
Common Mistakes:
  • Mixing pg_trgm with key-value or UUID tasks
  • Assuming uuid-ossp stores key-value pairs
  • Confusing hstore with text similarity

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More PostgreSQL Quizzes