Wide-Column and Graph Stores · seed 1 · A4, ink-friendly. The answer key prints on its own page for grown-ups.

Design from the question

Computing · Data & Databases · ages 20-22
Name ______________________   Date ____________
  1. What is first-class in a graph store?

    • Spreadsheets, stored as files
    • Backups, stored as snapshots
    • Relationships, stored as edges
  2. What does a wide-column design start from?

    • The query it must answer
    • The entities in the domain
    • The cheapest server size
  3. A friends-of-friends question in SQL needs one join per hop.

    Circle one:   True   False

  4. Why is a four-hop recommendation cheap in a graph store but costly in SQL?

    • A walk follows four edges, while SQL pays four joins
    • Graphs skip the network entirely
    • Graphs store less data overall
  5. Your app must list one user's inbox in time order. How do you shape the wide-column table?

    • Key rows by message text
    • Key by user with messages clustered by time
    • Key by timestamp alone for all users
  6. Which question would you NOT hand to a graph store?

    • Suggest friends two hops from Ana
    • Find the shortest path between two users
    • Count every account in the whole store
  7. A fraud check asks for accounts five hops from a suspect, plus a nightly total over all accounts. What is the honest plan?

    • Graph for the five-hop walk, another store for the full total
    • Run both on the graph store, since one store must do all
    • SQL joins for both, since graphs never help
  8. A team models an inbox as one table keyed by message id, then complains each inbox view needs a slow scan. What did they get backwards?

    • They used too few servers
    • They started from entities instead of the access pattern
    • They clustered messages by time too early
LightMySky · lightmysky.comW1-mt_4a4yDq83fy-s1

Answer key

For grown-ups. Fold this page away before handing over the rest.

Design from the question W1-mt_4a4yDq83fy-s1

  1. Relationships, stored as edges · Nodes and edges are the storage itself, so walks are cheap.
  2. The query it must answer · The access pattern comes first, and the table shape follows it.
  3. True · Each hop adds a join, which is why long chains hurt.
  4. A walk follows four edges, while SQL pays four joins · Edge walks stay local, while each join multiplies matching work.
  5. Key by user with messages clustered by time · One row per user with time-ordered messages answers the query in a single read.
  6. Count every account in the whole store · Whole-store scans visit every node and waste the graph's strength.
  7. Graph for the five-hop walk, another store for the full total · Each question shape deserves the store that answers it cheaply.
  8. They started from entities instead of the access pattern · Keying by message serves lookup by message, not the inbox query they actually ask.
Worksheet · LightMySky