اختيار البيانات
في هذه الصفحة 8 موضوعات
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
نظرة عامة
الموضوعات
- PostgreSQL مقابل Redis مقابل MongoDB مقابل محركات البحث
- قرارات مبنية على حِمل العمل
تعلّم أولًا
2 ساعة تدريب (تقدير)
مخرجات التعلم
- Characterize a workload (access patterns, volume, consistency, latency, query flexibility).
- Select a store from that characterization and justify it in an ADR.
- Count the operational cost of each additional datastore.
الدروس
المختبر والتمارين
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)
| ID | Outcome | Task |
|---|---|---|
| MID-044-EX01 | 1 | Characterize the sessions workload with the template (access, volume, consistency, latency, flexibility). |
| MID-044-EX02 | 2 | Pick a store for each: orders, product search, rate-limit counters, product reviews at 2 M rows; justify in one line. |
| MID-044-EX03 | 3 | List the operational costs of adding MongoDB to a team that runs only PostgreSQL. |
| MID-044-EX04 | 2 | Review this ADR: "We use MongoDB because it is modern and scalable." List what is missing. |
| MID-044-EX05 | 2 | Write 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.
اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.
الجزء العملي
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).