عرض عملي: تقسيم قاعدة بيانات Shop المشتركة
في هذا الدرس 3 موضوعات
هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
في هذا الدرس
separate schemas per service. Prepares MID-025-LAB1.
تفاصيل المخطط المبدئي
خطوة بخطوة
- Map every table to an owner and list queries that cross owners (for example a join of
ordersandproducts). - Create separate schemas and database users:
orders,inventory,payments. - Replace the cross-owner join with a snapshot in
order_linesand a call toinventory's API for stock. - Migrate data and move Flyway migrations into each service.
- Planned mistake: give
ordersread access "just for reporting" oninventory's table. Show how a column rename in inventory breaks it, then revoke and use an event feed instead. - Document the context map and data ownership table in the repo.
التطبيق
طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.
تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.