انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-042-L01

المستندات والمجموعات (Collections)

  • الدرس 1 من 7
  • Mid-level
في هذا الدرس 4 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

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

في هذا الدرس

know the MongoDB data model and basic operations.

الموضوعات المخطط لها

  • A document is BSON (binary JSON) with an _id; documents live in collections; collections live in databases.
  • Documents in one collection may differ in shape, but design a consistent shape and validate it (JSON Schema validation).
  • Basic operations: insertOne, find, updateOne with $set, deleteOne.
  • Maximum document size is 16 MB (verify before recording); unbounded growth is a design smell.
تفاصيل المخطط المبدئي

عرض عملي

js
db.reviews.insertOne({ productId: 42, customerId: 7, rating: 5, text: "Great", createdAt: new Date() })
db.reviews.find({ productId: 42 }).sort({ createdAt: -1 }).limit(20)

اختبر فهمك

What is a collection?

أظهر الإجابة

A group of documents, like a table without a fixed schema.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

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

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

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