مساحة المتعلّمLearner hub

الحزمة التعليمية الكاملةComplete learner course pack

الأسبوع الخامسالبيانات العلائقية وSQLWeek 5Day 1 — entities and relationship diagrams

مواد تعلّم مفتوحة للدراسة المستقلة. يبقى التقدم غير الرسمي في هذا المتصفح فقط، وقد يُمحى عند مسح بيانات تخزين المتصفح. لا يُنشأ هنا حساب أو سجل حضور أو درجة أو نتيجة مساق رسمية.Open learning materials for independent study. Unofficial progress stays only in this browser and can be erased if browser storage is cleared. No account, attendance record, score, or official course result is created here.

تنزيلات المساقCourse downloads

إصدار الحلSolution release

يتوفر بعد التحقق ونافذة الاستدراك والإصدار المعتمد من المدرّبAvailable after the checkpoint, recovery window, and trainer-approved release

اليوم 1Day 1

اليوم 1 — الكيانات ومخططات العلاقاتDay 1 — entities and relationship diagrams

ملخص الشرائحSlide summary

الأهدافObjectives

  • افصل حقول الورشة المقدمة إلى مشاركين وجلسات وحجوزات وارسم كل علاقة دون تكرار الحقائق.Separate the supplied workshop fields into participants, sessions, and bookings and draw every relationship without duplicating facts.
  • اشرح كل جدول ومفتاح وقيد ونتيجة استعلام باستخدام معرفات اصطناعية وأوامر محلية محجوبة فقط.Explain each table, key, constraint, and query result using only synthetic identifiers and redacted local commands.

المتطلبات المسبقةPrerequisites

  • اجتز تحقق الأسبوع الرابع للمستودع المختبر أو استخدم مسار الدعم المرتب.Pass the Week 4 tested-repository checkpoint or use the arranged supported path.
  • افتح حزمة بداية الأسبوع الخامس كما هي وتحقق من توفر PostgreSQL وpsql محلياً دون كشف كلمة مرور أو رابط اتصال.Open the exact Week 5 starter and confirm local PostgreSQL and psql are available without exposing a password or connection URL.

الشروحاتExplanations

حقيقة واحدة ومالك واحدOne fact, one owner

افصل حقول الورشة المقدمة إلى مشاركين وجلسات وحجوزات وارسم كل علاقة دون تكرار الحقائق.Separate the supplied workshop fields into participants, sessions, and bookings and draw every relationship without duplicating facts.

يحفظ المخطط الموثوق كل حقيقة مرة واحدة، ويجعل العلاقات صريحة، ويرفض الحالات المستحيلة، وينتج نتائج استعلام يمكن التحقق منها يدوياً.A trustworthy schema stores each fact once, makes relationships explicit, rejects impossible states, and produces query results that can be checked by hand.

أمثلةExamples
اسم العرض للمشارك يخص participants؛ والسعة تخص sessions؛ والحالة تخص bookingsparticipant label belongs to participants; capacity belongs to sessions; status belongs to bookings

الشرائحSlides

نتيجة اليوم القابلة للملاحظةToday's observable result

  • افصل حقول الورشة المقدمة إلى مشاركين وجلسات وحجوزات وارسم كل علاقة دون تكرار الحقائق.Separate the supplied workshop fields into participants, sessions, and bookings and draw every relationship without duplicating facts.

اطلب من متعلم توقع الدليل الدقيق قبل فتح psql.Ask a learner to predict the exact evidence before opening psql.

فصل الحقائق قبل كتابة SQLSeparate facts before writing SQL

  • اسم العرض للمشارك يخص participants؛ والسعة تخص sessions؛ والحالة تخص bookingsparticipant label belongs to participants; capacity belongs to sessions; status belongs to bookings

تتبع معرفاً واحداً عبر الجداول ثم قارن النتيجة المتوقعة بالنتيجة المنفذة.Trace one identifier across the tables, then compare the predicted and executed result.

البيانات الاصطناعية والأسرار المحليةSynthetic data and local secrets

  • استخدم معرفات P-/S-/B- فقط. أبقِ كلمات المرور وروابط الاتصال وملفات قاعدة البيانات وسجلات التسجيل الحقيقية خارج Git والأدلة.Use only P-/S-/B- identifiers. Keep passwords, connection URLs, database files, and real registration records outside Git and evidence.

نفّذ قائمة تحقق خصوصية قاعدة البيانات قبل المختبر.Run the database privacy checklist before the lab.

التدريب الموجّهGuided practice

  • صنّف الحقول المقدمة في ثلاثة صناديق وحدد الحقائق المتكررة وارسم سهمي المشارك إلى الحجز والجلسة إلى الحجز.Sort the supplied fields into three boxes, mark repeated facts, and draw participant-to-booking and session-to-booking arrows.

ورقة العملWorksheet

  1. قدّم مخطط الجداول الثلاثة المشروح وجدول ملكية الحقول واتجاهات العلاقات وتصحيحات الحقائق المتكررة.Submit the annotated three-table diagram, field ownership table, relationship directions, and duplicate-fact corrections.مرجع الدليل: w5d1-relationship-diagram-evidenceEvidence reference: w5d1-relationship-diagram-evidence

خطوات المختبرLab steps

  1. اكتب الجداول أو الصفوف المتأثرة أو نتيجة الاستعلام المتوقعة قبل تنفيذ SQL.Write the expected tables, affected rows, or query result before executing SQL.
  2. أنشئ مخطط علاقات الجداول الثلاثة وسمِّ كل عمود ونوع بيانات وعلل لماذا لا تنتمي حقائق المشارك والجلسة إلى bookings.Create the three-table relationship diagram, name each column and data type, and justify why participant and session facts do not belong in bookings.
  3. شغّل باستخدام ON_ERROR_STOP وقارن المخرج بالمرجع المنشور وحدد أول مفتاح أو قيد أو جزء استعلام معطوب.Run with ON_ERROR_STOP, compare output with the published oracle, and identify the first broken key, constraint, or query clause.
  4. احفظ SQL المحجوب والمخرجات الاصطناعية والتعليل وملاحظة استخدام الذكاء الاصطناعي أو عدم استخدامه فقط في ملف الدليل المسمى.Save only redacted SQL, synthetic output, reasoning, and the AI-use or non-use note in the named evidence file.

البيانات الاصطناعيةSynthetic data

الإدخال المقدمSupplied inputالنوع المتوقعExpected kind
participants ← bookings → sessions; 4 participants, 3 sessions, 4 bookingsaccepted
session S-999 with capacity 0rejected
booking B-999 with status unknownrejected
joined rows 4; unbooked P-104; confirmed counts S-201=1, S-202=1, S-203=0summary

مسرد الإنجليزية التقنيةTechnical English glossary

  • شيء مستقل نخزن حقائقهentity
  • بنية من صفوف وأعمدةtable
  • مثيل واحد داخل جدولrow
  • ارتباط قابل للتحقق بين جدولينrelationship

الخصوصيةPrivacy

استخدم صفوف الورشة الخيالية المقدمة فقط. لا تستورد قوائم تسجيل أو أسماء أو بيانات اتصال أو بيانات دخول أو روابط اتصال أو مجلدات بيانات PostgreSQL.Use only the supplied fictional workshop rows. Never import registration sheets, names, contact details, credentials, connection strings, or PostgreSQL data directories.

ممارسة الذكاء الاصطناعيAI practice

يمكن للذكاء الاصطناعي نقد جدول أو استعلام محجوب واحد بعد أن يتوقع المتعلم النتيجة. ولا يجوز أن ينشئ مخطط التحقق الكامل؛ وكل اقتراح مقبول يحتاج دليلاً محلياً من PostgreSQL.AI may critique one redacted table or query after the learner predicts the result. It must not generate the complete checkpoint schema; every accepted suggestion requires local PostgreSQL evidence.

الاستدراكRecovery

خلال أسبوع واحد، أعد بناء مخطط الجداول الثلاثة من الصفوف المقدمة وصحح أول مفتاح أو قيد أو استعلام معطوب وأعد تشغيل الدليل الاصطناعي نفسه ثم أعد تقديم مخطط العلاقات المشروح.Within one week, rebuild the three-table diagram from the supplied rows, correct the first broken key, constraint, or query, rerun the same synthetic evidence, and resubmit the annotated relationship diagram.

أخطاء شائعة ينبغي ملاحظتهاCommon errors to notice

  • تُكرر حقائق المشارك أو الجلسة في الحجوزات فتنتج تحديثات غير متسقة.Participant or session facts are duplicated in bookings, creating inconsistent updates.
  • يُذكر مفتاح أو قيد دون فرضه فيُقبل صف مستحيل.A key or constraint is named but not enforced, so an impossible row is accepted.
  • يحذف الربط الداخلي بصمت الجلسات ذات الصفر أو المشاركين بلا حجز.An inner join silently removes zero-booking sessions or unbooked participants.
دليلي التعلّمي المُبلّغ عنه ذاتياًMy self-reported learning evidence

يُحفظ في هذا المتصفح فقط لدعم تعلّمك الشخصي. ليس حضوراً ولا درجة ولا نتيجة تحقق ولا سجلاً لشهادة.Saved only in this browser to support your own learning. It is not attendance, a score, a checkpoint result, or a certificate record.

جارٍ تحميل ملاحظاتك التعليمية المحلية…Loading your local learning notes…

اليوم 2Day 2

اليوم 2 — المفاتيح الأساسية والخارجية والتطبيعDay 2 — primary keys, foreign keys, and normalisation

ملخص الشرائحSlide summary

الأهدافObjectives

  • اختر مفاتيح أساسية ثابتة للجداول الثلاثة وأضف مفتاحي الحجز الخارجيين وأثبت أن التصميم يحفظ كل حقيقة مرة واحدة.Choose stable primary keys for all three tables, add the two booking foreign keys, and prove the design stores each fact once.
  • اشرح كل جدول ومفتاح وقيد ونتيجة استعلام باستخدام معرفات اصطناعية وأوامر محلية محجوبة فقط.Explain each table, key, constraint, and query result using only synthetic identifiers and redacted local commands.

المتطلبات المسبقةPrerequisites

  • اجتز تحقق الأسبوع الرابع للمستودع المختبر أو استخدم مسار الدعم المرتب.Pass the Week 4 tested-repository checkpoint or use the arranged supported path.
  • افتح حزمة بداية الأسبوع الخامس كما هي وتحقق من توفر PostgreSQL وpsql محلياً دون كشف كلمة مرور أو رابط اتصال.Open the exact Week 5 starter and confirm local PostgreSQL and psql are available without exposing a password or connection URL.

الشروحاتExplanations

الهوية أولاً والمرجع ثانياًIdentity first, reference second

اختر مفاتيح أساسية ثابتة للجداول الثلاثة وأضف مفتاحي الحجز الخارجيين وأثبت أن التصميم يحفظ كل حقيقة مرة واحدة.Choose stable primary keys for all three tables, add the two booking foreign keys, and prove the design stores each fact once.

يحفظ المخطط الموثوق كل حقيقة مرة واحدة، ويجعل العلاقات صريحة، ويرفض الحالات المستحيلة، وينتج نتائج استعلام يمكن التحقق منها يدوياً.A trustworthy schema stores each fact once, makes relationships explicit, rejects impossible states, and produces query results that can be checked by hand.

أمثلةExamples
يحدد B-301 حجزاً واحداً؛ ويشير P-101 وS-201 إلى مشاركه وجلستهB-301 identifies one booking; P-101 and S-201 reference its participant and session

الشرائحSlides

نتيجة اليوم القابلة للملاحظةToday's observable result

  • اختر مفاتيح أساسية ثابتة للجداول الثلاثة وأضف مفتاحي الحجز الخارجيين وأثبت أن التصميم يحفظ كل حقيقة مرة واحدة.Choose stable primary keys for all three tables, add the two booking foreign keys, and prove the design stores each fact once.

اطلب من متعلم توقع الدليل الدقيق قبل فتح psql.Ask a learner to predict the exact evidence before opening psql.

جعل الهوية والمراجع قابلة للفرضMake identity and references enforceable

  • يحدد B-301 حجزاً واحداً؛ ويشير P-101 وS-201 إلى مشاركه وجلستهB-301 identifies one booking; P-101 and S-201 reference its participant and session

تتبع معرفاً واحداً عبر الجداول ثم قارن النتيجة المتوقعة بالنتيجة المنفذة.Trace one identifier across the tables, then compare the predicted and executed result.

البيانات الاصطناعية والأسرار المحليةSynthetic data and local secrets

  • استخدم معرفات P-/S-/B- فقط. أبقِ كلمات المرور وروابط الاتصال وملفات قاعدة البيانات وسجلات التسجيل الحقيقية خارج Git والأدلة.Use only P-/S-/B- identifiers. Keep passwords, connection URLs, database files, and real registration records outside Git and evidence.

نفّذ قائمة تحقق خصوصية قاعدة البيانات قبل المختبر.Run the database privacy checklist before the lab.

التدريب الموجّهGuided practice

  • تتبع B-301 عبر الجدولين الأبويين ثم توقع الصفوف اليتيمة والمكررة التي يجب أن يرفضها كل مفتاح.Trace B-301 through both parent tables, then predict which orphan and duplicate rows each key must reject.

ورقة العملWorksheet

  1. قدّم خريطة المفاتيح وشرح الأب والابن وتوقع الصف اليتيم ودليل تحميل كل مراجع P-/S-/B- الصالحة.Submit the key map, parent/child explanation, orphan-row prediction, and evidence that all valid P-/S-/B- references load.مرجع الدليل: w5d2-keys-normalisation-evidenceEvidence reference: w5d2-keys-normalisation-evidence

خطوات المختبرLab steps

  1. اكتب الجداول أو الصفوف المتأثرة أو نتيجة الاستعلام المتوقعة قبل تنفيذ SQL.Write the expected tables, affected rows, or query result before executing SQL.
  2. اكتب تعريفات الجداول الثلاثة بمفاتيح أساسية ثابتة ومفاتيح خارجية للحجز وحمّل الصفوف الاصطناعية الصالحة وافحص العلاقات الناتجة.Write the three table definitions with stable primary keys and booking foreign keys, load the valid synthetic rows, and inspect the resulting relationships.
  3. شغّل باستخدام ON_ERROR_STOP وقارن المخرج بالمرجع المنشور وحدد أول مفتاح أو قيد أو جزء استعلام معطوب.Run with ON_ERROR_STOP, compare output with the published oracle, and identify the first broken key, constraint, or query clause.
  4. احفظ SQL المحجوب والمخرجات الاصطناعية والتعليل وملاحظة استخدام الذكاء الاصطناعي أو عدم استخدامه فقط في ملف الدليل المسمى.Save only redacted SQL, synthetic output, reasoning, and the AI-use or non-use note in the named evidence file.

البيانات الاصطناعيةSynthetic data

الإدخال المقدمSupplied inputالنوع المتوقعExpected kind
participants ← bookings → sessions; 4 participants, 3 sessions, 4 bookingsaccepted
session S-999 with capacity 0rejected
booking B-999 with status unknownrejected
joined rows 4; unbooked P-104; confirmed counts S-201=1, S-202=1, S-203=0summary

مسرد الإنجليزية التقنيةTechnical English glossary

  • قيمة ثابتة تميز كل صفprimary key
  • قيمة تشير إلى صف في جدول آخرforeign key
  • الجدول الذي يملك المفتاح المشار إليهparent table
  • تنظيم الحقائق لتقليل التكرارnormalisation

الخصوصيةPrivacy

استخدم صفوف الورشة الخيالية المقدمة فقط. لا تستورد قوائم تسجيل أو أسماء أو بيانات اتصال أو بيانات دخول أو روابط اتصال أو مجلدات بيانات PostgreSQL.Use only the supplied fictional workshop rows. Never import registration sheets, names, contact details, credentials, connection strings, or PostgreSQL data directories.

ممارسة الذكاء الاصطناعيAI practice

يمكن للذكاء الاصطناعي نقد جدول أو استعلام محجوب واحد بعد أن يتوقع المتعلم النتيجة. ولا يجوز أن ينشئ مخطط التحقق الكامل؛ وكل اقتراح مقبول يحتاج دليلاً محلياً من PostgreSQL.AI may critique one redacted table or query after the learner predicts the result. It must not generate the complete checkpoint schema; every accepted suggestion requires local PostgreSQL evidence.

الاستدراكRecovery

خلال أسبوع واحد، أعد بناء مخطط الجداول الثلاثة من الصفوف المقدمة وصحح أول مفتاح أو قيد أو استعلام معطوب وأعد تشغيل الدليل الاصطناعي نفسه ثم أعد تقديم دليل المفاتيح والتطبيع.Within one week, rebuild the three-table diagram from the supplied rows, correct the first broken key, constraint, or query, rerun the same synthetic evidence, and resubmit the key and normalisation evidence.

أخطاء شائعة ينبغي ملاحظتهاCommon errors to notice

  • تُكرر حقائق المشارك أو الجلسة في الحجوزات فتنتج تحديثات غير متسقة.Participant or session facts are duplicated in bookings, creating inconsistent updates.
  • يُذكر مفتاح أو قيد دون فرضه فيُقبل صف مستحيل.A key or constraint is named but not enforced, so an impossible row is accepted.
  • يحذف الربط الداخلي بصمت الجلسات ذات الصفر أو المشاركين بلا حجز.An inner join silently removes zero-booking sessions or unbooked participants.
دليلي التعلّمي المُبلّغ عنه ذاتياًMy self-reported learning evidence

يُحفظ في هذا المتصفح فقط لدعم تعلّمك الشخصي. ليس حضوراً ولا درجة ولا نتيجة تحقق ولا سجلاً لشهادة.Saved only in this browser to support your own learning. It is not attendance, a score, a checkpoint result, or a certificate record.

جارٍ تحميل ملاحظاتك التعليمية المحلية…Loading your local learning notes…

اليوم 3Day 3

اليوم 3 — القيود والحالات المرفوضةDay 3 — constraints and rejected states

ملخص الشرائحSlide summary

الأهدافObjectives

  • افرض القيم المطلوبة والمتفردة والسعة الموجبة وحالات الحجز المسموحة وحجزاً واحداً للمشارك في الجلسة ثم احفظ دليل رفض مضبوطاً.Enforce required and unique values, positive capacity, allowed booking statuses, and one participant booking per session, then capture controlled rejection evidence.
  • اشرح كل جدول ومفتاح وقيد ونتيجة استعلام باستخدام معرفات اصطناعية وأوامر محلية محجوبة فقط.Explain each table, key, constraint, and query result using only synthetic identifiers and redacted local commands.

المتطلبات المسبقةPrerequisites

  • اجتز تحقق الأسبوع الرابع للمستودع المختبر أو استخدم مسار الدعم المرتب.Pass the Week 4 tested-repository checkpoint or use the arranged supported path.
  • افتح حزمة بداية الأسبوع الخامس كما هي وتحقق من توفر PostgreSQL وpsql محلياً دون كشف كلمة مرور أو رابط اتصال.Open the exact Week 5 starter and confirm local PostgreSQL and psql are available without exposing a password or connection URL.

الشروحاتExplanations

رفض الحالات المستحيلة عند الحدReject impossible states at the boundary

افرض القيم المطلوبة والمتفردة والسعة الموجبة وحالات الحجز المسموحة وحجزاً واحداً للمشارك في الجلسة ثم احفظ دليل رفض مضبوطاً.Enforce required and unique values, positive capacity, allowed booking statuses, and one participant booking per session, then capture controlled rejection evidence.

يحفظ المخطط الموثوق كل حقيقة مرة واحدة، ويجعل العلاقات صريحة، ويرفض الحالات المستحيلة، وينتج نتائج استعلام يمكن التحقق منها يدوياً.A trustworthy schema stores each fact once, makes relationships explicit, rejects impossible states, and produces query results that can be checked by hand.

أمثلةExamples
السعة 0 ← مرفوضة؛ الحالة unknown ← مرفوضة؛ زوج المشارك/الجلسة المكرر ← مرفوضcapacity 0 → rejected; status unknown → rejected; duplicate participant/session pair → rejected

الشرائحSlides

نتيجة اليوم القابلة للملاحظةToday's observable result

  • افرض القيم المطلوبة والمتفردة والسعة الموجبة وحالات الحجز المسموحة وحجزاً واحداً للمشارك في الجلسة ثم احفظ دليل رفض مضبوطاً.Enforce required and unique values, positive capacity, allowed booking statuses, and one participant booking per session, then capture controlled rejection evidence.

اطلب من متعلم توقع الدليل الدقيق قبل فتح psql.Ask a learner to predict the exact evidence before opening psql.

تحويل قواعد البيانات إلى قيود قاعدةTurn data rules into database rules

  • السعة 0 ← مرفوضة؛ الحالة unknown ← مرفوضة؛ زوج المشارك/الجلسة المكرر ← مرفوضcapacity 0 → rejected; status unknown → rejected; duplicate participant/session pair → rejected

تتبع معرفاً واحداً عبر الجداول ثم قارن النتيجة المتوقعة بالنتيجة المنفذة.Trace one identifier across the tables, then compare the predicted and executed result.

البيانات الاصطناعية والأسرار المحليةSynthetic data and local secrets

  • استخدم معرفات P-/S-/B- فقط. أبقِ كلمات المرور وروابط الاتصال وملفات قاعدة البيانات وسجلات التسجيل الحقيقية خارج Git والأدلة.Use only P-/S-/B- identifiers. Keep passwords, connection URLs, database files, and real registration records outside Git and evidence.

نفّذ قائمة تحقق خصوصية قاعدة البيانات قبل المختبر.Run the database privacy checklist before the lab.

التدريب الموجّهGuided practice

  • طابق كل صف مستحيل منشور مع حماية NOT NULL أو UNIQUE أو المفتاح الخارجي أو CHECK للنطاق قبل تنفيذه.Match each published impossible row to NOT NULL, UNIQUE, foreign-key, or domain CHECK protection before executing it.

ورقة العملWorksheet

  1. قدّم مصفوفة القاعدة إلى القيد وتوقعي ومخرجي الصفين المرفوضين ودليل استمرار تحميل صفوف البداية الصالحة.Submit the rule-to-constraint matrix, two rejected-row predictions and outputs, and proof that valid seed rows still load.مرجع الدليل: w5d3-constraints-rejection-evidenceEvidence reference: w5d3-constraints-rejection-evidence

خطوات المختبرLab steps

  1. اكتب الجداول أو الصفوف المتأثرة أو نتيجة الاستعلام المتوقعة قبل تنفيذ SQL.Write the expected tables, affected rows, or query result before executing SQL.
  2. أضف القيود المطلوبة وأعد تحميل الصفوف الصالحة وحاول إدخال صف السعة صفر وصف الحالة unknown داخل معاملات قابلة للاستعادة واحفظ رسائل الرفض الآمنة.Add the required constraints, reload valid rows, attempt the capacity-zero and unknown-status rows inside recoverable transactions, and save the safe rejection messages.
  3. شغّل باستخدام ON_ERROR_STOP وقارن المخرج بالمرجع المنشور وحدد أول مفتاح أو قيد أو جزء استعلام معطوب.Run with ON_ERROR_STOP, compare output with the published oracle, and identify the first broken key, constraint, or query clause.
  4. احفظ SQL المحجوب والمخرجات الاصطناعية والتعليل وملاحظة استخدام الذكاء الاصطناعي أو عدم استخدامه فقط في ملف الدليل المسمى.Save only redacted SQL, synthetic output, reasoning, and the AI-use or non-use note in the named evidence file.

البيانات الاصطناعيةSynthetic data

الإدخال المقدمSupplied inputالنوع المتوقعExpected kind
participants ← bookings → sessions; 4 participants, 3 sessions, 4 bookingsaccepted
session S-999 with capacity 0rejected
booking B-999 with status unknownrejected
joined rows 4; unbooked P-104; confirmed counts S-201=1, S-202=1, S-203=0summary

مسرد الإنجليزية التقنيةTechnical English glossary

  • قاعدة ترفض بيانات غير صالحةconstraint
  • قيد يمنع القيمة الغائبةNOT NULL
  • قيد يمنع التكرارUNIQUE
  • قيد يفرض شرط نطاقCHECK

الخصوصيةPrivacy

استخدم صفوف الورشة الخيالية المقدمة فقط. لا تستورد قوائم تسجيل أو أسماء أو بيانات اتصال أو بيانات دخول أو روابط اتصال أو مجلدات بيانات PostgreSQL.Use only the supplied fictional workshop rows. Never import registration sheets, names, contact details, credentials, connection strings, or PostgreSQL data directories.

ممارسة الذكاء الاصطناعيAI practice

يمكن للذكاء الاصطناعي نقد جدول أو استعلام محجوب واحد بعد أن يتوقع المتعلم النتيجة. ولا يجوز أن ينشئ مخطط التحقق الكامل؛ وكل اقتراح مقبول يحتاج دليلاً محلياً من PostgreSQL.AI may critique one redacted table or query after the learner predicts the result. It must not generate the complete checkpoint schema; every accepted suggestion requires local PostgreSQL evidence.

الاستدراكRecovery

خلال أسبوع واحد، أعد بناء مخطط الجداول الثلاثة من الصفوف المقدمة وصحح أول مفتاح أو قيد أو استعلام معطوب وأعد تشغيل الدليل الاصطناعي نفسه ثم أعد تقديم دليل القيود والرفض.Within one week, rebuild the three-table diagram from the supplied rows, correct the first broken key, constraint, or query, rerun the same synthetic evidence, and resubmit the constraint and rejection evidence.

أخطاء شائعة ينبغي ملاحظتهاCommon errors to notice

  • تُكرر حقائق المشارك أو الجلسة في الحجوزات فتنتج تحديثات غير متسقة.Participant or session facts are duplicated in bookings, creating inconsistent updates.
  • يُذكر مفتاح أو قيد دون فرضه فيُقبل صف مستحيل.A key or constraint is named but not enforced, so an impossible row is accepted.
  • يحذف الربط الداخلي بصمت الجلسات ذات الصفر أو المشاركين بلا حجز.An inner join silently removes zero-booking sessions or unbooked participants.
دليلي التعلّمي المُبلّغ عنه ذاتياًMy self-reported learning evidence

يُحفظ في هذا المتصفح فقط لدعم تعلّمك الشخصي. ليس حضوراً ولا درجة ولا نتيجة تحقق ولا سجلاً لشهادة.Saved only in this browser to support your own learning. It is not attendance, a score, a checkpoint result, or a certificate record.

جارٍ تحميل ملاحظاتك التعليمية المحلية…Loading your local learning notes…

اليوم 4Day 4

اليوم 4 — أسئلة الربط والتجميعDay 4 — joins and aggregate questions

ملخص الشرائحSlide summary

الأهدافObjectives

  • اكتب قائمة حجوزات مترابطة وحدد المشارك بلا حجز واحسب الحجوزات المؤكدة لكل جلسة بما فيها الصفر ثم طابق النتائج المحسوبة يدوياً.Write a joined booking list, find the unbooked participant, and count confirmed bookings for every session including zero, then match hand-calculated results.
  • اشرح كل جدول ومفتاح وقيد ونتيجة استعلام باستخدام معرفات اصطناعية وأوامر محلية محجوبة فقط.Explain each table, key, constraint, and query result using only synthetic identifiers and redacted local commands.

المتطلبات المسبقةPrerequisites

  • اجتز تحقق الأسبوع الرابع للمستودع المختبر أو استخدم مسار الدعم المرتب.Pass the Week 4 tested-repository checkpoint or use the arranged supported path.
  • افتح حزمة بداية الأسبوع الخامس كما هي وتحقق من توفر PostgreSQL وpsql محلياً دون كشف كلمة مرور أو رابط اتصال.Open the exact Week 5 starter and confirm local PostgreSQL and psql are available without exposing a password or connection URL.

الشروحاتExplanations

الحفاظ على الصفوف التي يتطلبها السؤالPreserve the rows the question requires

اكتب قائمة حجوزات مترابطة وحدد المشارك بلا حجز واحسب الحجوزات المؤكدة لكل جلسة بما فيها الصفر ثم طابق النتائج المحسوبة يدوياً.Write a joined booking list, find the unbooked participant, and count confirmed bookings for every session including zero, then match hand-calculated results.

يحفظ المخطط الموثوق كل حقيقة مرة واحدة، ويجعل العلاقات صريحة، ويرفض الحالات المستحيلة، وينتج نتائج استعلام يمكن التحقق منها يدوياً.A trustworthy schema stores each fact once, makes relationships explicit, rejects impossible states, and produces query results that can be checked by hand.

أمثلةExamples
4 حجوزات مترابطة؛ P-104 بلا حجز؛ أعداد المؤكد 1 و1 و04 joined bookings; P-104 unbooked; confirmed counts 1, 1, 0

الشرائحSlides

نتيجة اليوم القابلة للملاحظةToday's observable result

  • اكتب قائمة حجوزات مترابطة وحدد المشارك بلا حجز واحسب الحجوزات المؤكدة لكل جلسة بما فيها الصفر ثم طابق النتائج المحسوبة يدوياً.Write a joined booking list, find the unbooked participant, and count confirmed bookings for every session including zero, then match hand-calculated results.

اطلب من متعلم توقع الدليل الدقيق قبل فتح psql.Ask a learner to predict the exact evidence before opening psql.

تحويل الأسئلة إلى SQL قابل للتحققTranslate questions into checkable SQL

  • 4 حجوزات مترابطة؛ P-104 بلا حجز؛ أعداد المؤكد 1 و1 و04 joined bookings; P-104 unbooked; confirmed counts 1, 1, 0

تتبع معرفاً واحداً عبر الجداول ثم قارن النتيجة المتوقعة بالنتيجة المنفذة.Trace one identifier across the tables, then compare the predicted and executed result.

البيانات الاصطناعية والأسرار المحليةSynthetic data and local secrets

  • استخدم معرفات P-/S-/B- فقط. أبقِ كلمات المرور وروابط الاتصال وملفات قاعدة البيانات وسجلات التسجيل الحقيقية خارج Git والأدلة.Use only P-/S-/B- identifiers. Keep passwords, connection URLs, database files, and real registration records outside Git and evidence.

نفّذ قائمة تحقق خصوصية قاعدة البيانات قبل المختبر.Run the database privacy checklist before the lab.

التدريب الموجّهGuided practice

  • حدد أعمدة وصفوف المخرج المطلوبة واختر اتجاهات الربط واحسب النتائج الثلاث المتوقعة دون SQL.Mark required output columns and rows, choose join directions, and calculate the three expected results without SQL.

ورقة العملWorksheet

  1. قدّم كل سؤال بلغة بسيطة والصفوف المتوقعة وSQL والمخرج الفعلي وتشخيص الاختلاف والنتيجة النهائية الدقيقة.Submit each plain-language question, predicted rows, SQL, actual output, mismatch diagnosis, and final exact result.مرجع الدليل: w5d4-query-results-evidenceEvidence reference: w5d4-query-results-evidence

خطوات المختبرLab steps

  1. اكتب الجداول أو الصفوف المتأثرة أو نتيجة الاستعلام المتوقعة قبل تنفيذ SQL.Write the expected tables, affected rows, or query result before executing SQL.
  2. أكمل مطالب الاستعلامات الثلاثة ورتب المخرج بصورة حتمية وقارن كل صف وعدد بالمرجع العام وصحح أول جزء منحرف فقط.Complete the three query prompts, order output deterministically, compare every row and count with the public oracle, and correct only the first divergent clause.
  3. شغّل باستخدام ON_ERROR_STOP وقارن المخرج بالمرجع المنشور وحدد أول مفتاح أو قيد أو جزء استعلام معطوب.Run with ON_ERROR_STOP, compare output with the published oracle, and identify the first broken key, constraint, or query clause.
  4. احفظ SQL المحجوب والمخرجات الاصطناعية والتعليل وملاحظة استخدام الذكاء الاصطناعي أو عدم استخدامه فقط في ملف الدليل المسمى.Save only redacted SQL, synthetic output, reasoning, and the AI-use or non-use note in the named evidence file.

البيانات الاصطناعيةSynthetic data

الإدخال المقدمSupplied inputالنوع المتوقعExpected kind
participants ← bookings → sessions; 4 participants, 3 sessions, 4 bookingsaccepted
session S-999 with capacity 0rejected
booking B-999 with status unknownrejected
joined rows 4; unbooked P-104; confirmed counts S-201=1, S-202=1, S-203=0summary

مسرد الإنجليزية التقنيةTechnical English glossary

  • استعلام يختار أعمدة وصفوفاًSELECT
  • ربط صفوف من عدة جداولJOIN
  • حساب يلخص عدة صفوفaggregate
  • تجميع الصفوف حسب قيمةGROUP BY

الخصوصيةPrivacy

استخدم صفوف الورشة الخيالية المقدمة فقط. لا تستورد قوائم تسجيل أو أسماء أو بيانات اتصال أو بيانات دخول أو روابط اتصال أو مجلدات بيانات PostgreSQL.Use only the supplied fictional workshop rows. Never import registration sheets, names, contact details, credentials, connection strings, or PostgreSQL data directories.

ممارسة الذكاء الاصطناعيAI practice

يمكن للذكاء الاصطناعي نقد جدول أو استعلام محجوب واحد بعد أن يتوقع المتعلم النتيجة. ولا يجوز أن ينشئ مخطط التحقق الكامل؛ وكل اقتراح مقبول يحتاج دليلاً محلياً من PostgreSQL.AI may critique one redacted table or query after the learner predicts the result. It must not generate the complete checkpoint schema; every accepted suggestion requires local PostgreSQL evidence.

الاستدراكRecovery

خلال أسبوع واحد، أعد بناء مخطط الجداول الثلاثة من الصفوف المقدمة وصحح أول مفتاح أو قيد أو استعلام معطوب وأعد تشغيل الدليل الاصطناعي نفسه ثم أعد تقديم دليل الاستعلامات المتحقق منه يدوياً.Within one week, rebuild the three-table diagram from the supplied rows, correct the first broken key, constraint, or query, rerun the same synthetic evidence, and resubmit the hand-checked query evidence.

أخطاء شائعة ينبغي ملاحظتهاCommon errors to notice

  • تُكرر حقائق المشارك أو الجلسة في الحجوزات فتنتج تحديثات غير متسقة.Participant or session facts are duplicated in bookings, creating inconsistent updates.
  • يُذكر مفتاح أو قيد دون فرضه فيُقبل صف مستحيل.A key or constraint is named but not enforced, so an impossible row is accepted.
  • يحذف الربط الداخلي بصمت الجلسات ذات الصفر أو المشاركين بلا حجز.An inner join silently removes zero-booking sessions or unbooked participants.
دليلي التعلّمي المُبلّغ عنه ذاتياًMy self-reported learning evidence

يُحفظ في هذا المتصفح فقط لدعم تعلّمك الشخصي. ليس حضوراً ولا درجة ولا نتيجة تحقق ولا سجلاً لشهادة.Saved only in this browser to support your own learning. It is not attendance, a score, a checkpoint result, or a certificate record.

جارٍ تحميل ملاحظاتك التعليمية المحلية…Loading your local learning notes…

اليوم 5Day 5

اليوم 5 — التحقق الفردي للمخطط المُطبّعDay 5 — individual normalised-schema checkpoint

ملخص الشرائحSlide summary

الأهدافObjectives

  • ابنِ الجداول الثلاثة المترابطة بصورة فردية وافرض كل القواعد المنشورة وحمّل الصفوف الاصطناعية وارفض صفاً مستحيلاً وشغّل الاستعلامات الثلاثة واشرح التصميم.Individually build the three related tables, enforce all published rules, load synthetic rows, reject one impossible row, run the three queries, and explain the design.
  • اشرح كل جدول ومفتاح وقيد ونتيجة استعلام باستخدام معرفات اصطناعية وأوامر محلية محجوبة فقط.Explain each table, key, constraint, and query result using only synthetic identifiers and redacted local commands.

المتطلبات المسبقةPrerequisites

  • اجتز تحقق الأسبوع الرابع للمستودع المختبر أو استخدم مسار الدعم المرتب.Pass the Week 4 tested-repository checkpoint or use the arranged supported path.
  • افتح حزمة بداية الأسبوع الخامس كما هي وتحقق من توفر PostgreSQL وpsql محلياً دون كشف كلمة مرور أو رابط اتصال.Open the exact Week 5 starter and confirm local PostgreSQL and psql are available without exposing a password or connection URL.

الشروحاتExplanations

يثبت دليل المخطط انتقال التعلم بصورة مستقلةSchema evidence proves independent transfer

ابنِ الجداول الثلاثة المترابطة بصورة فردية وافرض كل القواعد المنشورة وحمّل الصفوف الاصطناعية وارفض صفاً مستحيلاً وشغّل الاستعلامات الثلاثة واشرح التصميم.Individually build the three related tables, enforce all published rules, load synthetic rows, reject one impossible row, run the three queries, and explain the design.

يحفظ المخطط الموثوق كل حقيقة مرة واحدة، ويجعل العلاقات صريحة، ويرفض الحالات المستحيلة، وينتج نتائج استعلام يمكن التحقق منها يدوياً.A trustworthy schema stores each fact once, makes relationships explicit, rejects impossible states, and produces query results that can be checked by hand.

أمثلةExamples
3 مفاتيح أساسية ثابتة + مفتاحان خارجيان صالحان + قواعد مفروضة + دليل استعلامات 4/P-104/1-1-0 الدقيق3 stable primary keys + 2 valid foreign keys + enforced rules + exact 4/P-104/1-1-0 query evidence

الشرائحSlides

نتيجة اليوم القابلة للملاحظةToday's observable result

  • ابنِ الجداول الثلاثة المترابطة بصورة فردية وافرض كل القواعد المنشورة وحمّل الصفوف الاصطناعية وارفض صفاً مستحيلاً وشغّل الاستعلامات الثلاثة واشرح التصميم.Individually build the three related tables, enforce all published rules, load synthetic rows, reject one impossible row, run the three queries, and explain the design.

اطلب من متعلم توقع الدليل الدقيق قبل فتح psql.Ask a learner to predict the exact evidence before opening psql.

التصميم والفرض والاستعلام والشرح بصورة فرديةDesign, enforce, query, and explain independently

  • 3 مفاتيح أساسية ثابتة + مفتاحان خارجيان صالحان + قواعد مفروضة + دليل استعلامات 4/P-104/1-1-0 الدقيق3 stable primary keys + 2 valid foreign keys + enforced rules + exact 4/P-104/1-1-0 query evidence

تتبع معرفاً واحداً عبر الجداول ثم قارن النتيجة المتوقعة بالنتيجة المنفذة.Trace one identifier across the tables, then compare the predicted and executed result.

البيانات الاصطناعية والأسرار المحليةSynthetic data and local secrets

  • استخدم معرفات P-/S-/B- فقط. أبقِ كلمات المرور وروابط الاتصال وملفات قاعدة البيانات وسجلات التسجيل الحقيقية خارج Git والأدلة.Use only P-/S-/B- identifiers. Keep passwords, connection URLs, database files, and real registration records outside Git and evidence.

نفّذ قائمة تحقق خصوصية قاعدة البيانات قبل المختبر.Run the database privacy checklist before the lab.

التدريب الموجّهGuided practice

  • اقرأ المعيار وأعد رسم نموذج الجداول الثلاثة وتوقع الصف غير الصالح ومخرجات الاستعلام وحدد البيانات المحظورة قبل البناء المحدد بالوقت.Read the rubric, redraw the three-table model, predict the invalid row and query outputs, and identify prohibited data before the timed build.

ورقة العملWorksheet

  1. أكمل سجل التحقق الفردي: المخطط والجداول والمفاتيح والقيود والتحميل الصالح والصف المرفوض ونتائج الاستعلامات الثلاثة الدقيقة وفحص الخصوصية وملاحظة الذكاء الاصطناعي والشرح المباشر.Complete the individual checkpoint record: diagram, tables, keys, constraints, valid load, rejected row, three exact query results, privacy scan, AI note, and live explanation.مرجع الدليل: w5d5-checkpoint-evidenceEvidence reference: w5d5-checkpoint-evidence

خطوات المختبرLab steps

  1. اكتب الجداول أو الصفوف المتأثرة أو نتيجة الاستعلام المتوقعة قبل تنفيذ SQL.Write the expected tables, affected rows, or query result before executing SQL.
  2. من حزمة البداية دون تغيير، أكمل schema.sql وqueries.sql وحمّل seed.sql وأثبت رفض قيد وشغّل الاستعلامات الثلاثة واشرح مسار مفتاح واحد ومسار عدد صفر واحد مباشرة.From the unchanged starter, complete schema.sql and queries.sql, load seed.sql, prove a constraint rejection, run all three queries, and explain one key path and one zero-count path live.
  3. شغّل باستخدام ON_ERROR_STOP وقارن المخرج بالمرجع المنشور وحدد أول مفتاح أو قيد أو جزء استعلام معطوب.Run with ON_ERROR_STOP, compare output with the published oracle, and identify the first broken key, constraint, or query clause.
  4. احفظ SQL المحجوب والمخرجات الاصطناعية والتعليل وملاحظة استخدام الذكاء الاصطناعي أو عدم استخدامه فقط في ملف الدليل المسمى.Save only redacted SQL, synthetic output, reasoning, and the AI-use or non-use note in the named evidence file.

البيانات الاصطناعيةSynthetic data

الإدخال المقدمSupplied inputالنوع المتوقعExpected kind
participants ← bookings → sessions; 4 participants, 3 sessions, 4 bookingsaccepted
session S-999 with capacity 0rejected
booking B-999 with status unknownrejected
joined rows 4; unbooked P-104; confirmed counts S-201=1, S-202=1, S-203=0summary

مسرد الإنجليزية التقنيةTechnical English glossary

  • تعريف بنية قاعدة البيانات وقواعدهاschema
  • قيمة تميز كل صفprimary key
  • قيمة تشير إلى صف مرتبطforeign key
  • سؤال منظم لقاعدة البياناتquery
  • قاعدة ترفض حالة غير صالحةconstraint

الخصوصيةPrivacy

استخدم صفوف الورشة الخيالية المقدمة فقط. لا تستورد قوائم تسجيل أو أسماء أو بيانات اتصال أو بيانات دخول أو روابط اتصال أو مجلدات بيانات PostgreSQL.Use only the supplied fictional workshop rows. Never import registration sheets, names, contact details, credentials, connection strings, or PostgreSQL data directories.

ممارسة الذكاء الاصطناعيAI practice

يمكن للذكاء الاصطناعي نقد جدول أو استعلام محجوب واحد بعد أن يتوقع المتعلم النتيجة. ولا يجوز أن ينشئ مخطط التحقق الكامل؛ وكل اقتراح مقبول يحتاج دليلاً محلياً من PostgreSQL.AI may critique one redacted table or query after the learner predicts the result. It must not generate the complete checkpoint schema; every accepted suggestion requires local PostgreSQL evidence.

الاستدراكRecovery

خلال أسبوع واحد، أعد بناء مخطط الجداول الثلاثة من الصفوف المقدمة وصحح أول مفتاح أو قيد أو استعلام معطوب وأعد تشغيل الدليل الاصطناعي نفسه ثم أعد تقديم دليل تحقق الأسبوع الخامس الفردي.Within one week, rebuild the three-table diagram from the supplied rows, correct the first broken key, constraint, or query, rerun the same synthetic evidence, and resubmit the individual week 5 checkpoint evidence.

أخطاء شائعة ينبغي ملاحظتهاCommon errors to notice

  • تُكرر حقائق المشارك أو الجلسة في الحجوزات فتنتج تحديثات غير متسقة.Participant or session facts are duplicated in bookings, creating inconsistent updates.
  • يُذكر مفتاح أو قيد دون فرضه فيُقبل صف مستحيل.A key or constraint is named but not enforced, so an impossible row is accepted.
  • يحذف الربط الداخلي بصمت الجلسات ذات الصفر أو المشاركين بلا حجز.An inner join silently removes zero-booking sessions or unbooked participants.
دليلي التعلّمي المُبلّغ عنه ذاتياًMy self-reported learning evidence

يُحفظ في هذا المتصفح فقط لدعم تعلّمك الشخصي. ليس حضوراً ولا درجة ولا نتيجة تحقق ولا سجلاً لشهادة.Saved only in this browser to support your own learning. It is not attendance, a score, a checkpoint result, or a certificate record.

جارٍ تحميل ملاحظاتك التعليمية المحلية…Loading your local learning notes…