انتقل إلى المحتوى
أمين أبوزيد
MID-044

اختيار البيانات

  • 4 درس
  • 2 ساعة تدريب (تقدير)
في هذه الصفحة 8 موضوعات

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

نظرة عامة

الموضوعات

  • PostgreSQL مقابل Redis مقابل MongoDB مقابل محركات البحث
  • قرارات مبنية على حِمل العمل

تعلّم أولًا

2 ساعة تدريب (تقدير)

مخرجات التعلم

  1. Characterize a workload (access patterns, volume, consistency, latency, query flexibility).
  2. Select a store from that characterization and justify it in an ADR.
  3. Count the operational cost of each additional datastore.

الدروس

  1. 01توصيف حِمل العمل
  2. 02PostgreSQL أولًا، ومتى لا
  3. 03الكلفة التشغيلية لقاعدة بيانات إضافية
  4. 04عرض عملي: كتابة ADR لمخزن بيانات المراجعات

المختبر والتمارين

Lab

MID-044-LAB1 · Datastore ADRs

Outcomes: 1–3 · Time: ~2 h Write one ADR each for Shop's catalog, orders, reviews, search, and sessions. Each ADR has context, workload characterization with evidence, options, decision, consequences, operational cost, and a revisit trigger. Acceptance: each cites workload evidence; at least one concludes "PostgreSQL is enough".

Exercises (assessment: ADR review)

IDOutcomeTask
MID-044-EX011Characterize the sessions workload with the template (access, volume, consistency, latency, flexibility).
MID-044-EX022Pick a store for each: orders, product search, rate-limit counters, product reviews at 2 M rows; justify in one line.
MID-044-EX033List the operational costs of adding MongoDB to a team that runs only PostgreSQL.
MID-044-EX042Review this ADR: "We use MongoDB because it is modern and scalable." List what is missing.
MID-044-EX052Write the revisit triggers for the reviews ADR.
أظهر الحلول
  • EX01 Point lookups by token, high read and write, small values, short TTL, loss tolerable (re-login), latency milliseconds, no query flexibility: a key-value store with TTL.
  • EX02 Orders: PostgreSQL (transactions). Search: OpenSearch if facets and typos matter, else PostgreSQL FTS. Counters: Redis. Reviews at 2 M rows: PostgreSQL is enough.
  • EX03 Provisioning, backup and restore tests, monitoring and alerts, upgrades, security, runbooks, skills and on-call, data sync and consistency.
  • EX04 Workload numbers, alternatives considered, consequences, operational cost, revisit trigger, and why PostgreSQL was rejected.
  • EX05 Example: review volume above 200 M, write rate above 5 000/s, or read latency targets missed after indexing and partitioning.

Outcome 1 is also covered by the lab (workload evidence in each ADR).

الاختبار

Outcomes: O1 characterize a workload · O2 select and justify · O3 operational cost.

اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.

  1. 1Which is NOT part of workload characterization?O1
  2. 2Evidence for a workload should come from:O1
  3. 3"Query flexibility" asks:O1
  4. 4A sensible default store for orders is:O2
  5. 5An ADR must include:O2
  6. 6"PostgreSQL is enough" as an ADR conclusion is:O2
  7. 7Rate-limit counters with TTL fit best:O2
  8. 8Which is an operational cost of another database?O3
  9. 9Keeping a second store in sync adds:O3
  10. 10Which choice rationale is weakest?O3

الجزء العملي

ADR review (MID-044-EX04) plus lab MID-044-LAB1 (five ADRs). Pass: quiz at least 8/10, every ADR citing evidence, and at least one concluding that PostgreSQL is enough.

أخطاء شائعة

Choosing by popularity; ignoring backup, monitoring, and skills cost.

التقييم

ADR review.

الصلة بالمسار الوظيفي

Technology evaluation (SRB-013) and database architecture (ARC-016).

اكتب للبحث في المستويات والمراحل والوحدات والدروس.