عرض عملي: البيانات نفسها في أربعة نماذج
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
model Shop reviews four ways and compare the queries each supports. Prepares MID-041-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Relational: tables
review,product,customer; show the join for "latest 20 with customer name". - Document: one review per document, with the customer name copied in; show a find by
productIdsorted by date. - Wide-column:
reviews_by_productandreviews_by_customertables; show the duplicated writes. - Graph:
(Customer)-[:WROTE]->(Review)-[:ABOUT]->(Product); show a "similar reviewers" traversal. - Planned mistake: copy the relational schema into the document store with references everywhere; every read needs several lookups. Fix: embed what is read together (customer display name, rating).
- Fill the comparison table of queries each model supports well.
اختبر فهمك
Which model best answers "latest reviews of a product" at huge write volume?
أظهر الإجابة
Wide-column, partitioned by product.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.