Wide-Column and Graph Stores
A wide-column store arranges data by the queries it must serve, so the design starts from the access pattern rather than the entities. A graph store makes relationships first-class, which turns a chain of joins into a traversal.
کارهایی که یادگیرنده بعد از این درس میتواند انجام دهد
- Design a wide-column table starting from the query it must answer
- Express a friends-of-friends question as a traversal rather than repeated joins
- Say which questions a graph store answers cheaply and which it does not
۱ · بخوان
You already know tables model entities and joins connect them. A wide-column store flips the starting point. You begin from the access pattern, the exact query the app must answer fast, and shape the table around it.
Your app must show one user's inbox in time order. So you build a table keyed by user, with that user's messages clustered by timestamp inside the row. The query reads one row and the inbox is already sorted.
A graph store makes relationships first-class instead. People and friendships are stored as nodes and edges, so a friends-of-friends question becomes a walk along edges. In SQL the same question needs a chain of joins, one per hop.
Pick the store by the question shape. Hop-by-hop neighbourhood questions are cheap in a graph, while questions that scan every node cost a lot. A graph buys cheap traversals and gives up cheap whole-store scans.
Wide-column tables start from the query, and graph stores turn join chains into cheap walks along edges.
۲ · ببین
به انگلیسیدور از صفحهنمایش
جایگاه این موضوع
اول اینها را یاد بگیر
پیوندهای اختیاری
این موضوع راه اینها را باز میکند
۸ سؤال پشت این درس منتظرند، هر کدام با پاسخ توضیحدادهشده. هر پاسخ آسمان را پر میکند: ستارهها هنگام یادگیری روشن میشوند و وقتی زمان برگشتن است کمرنگ میشوند.
شروع یادگیری این موضوع