Archicise
Exercise

Design a Content Management Database (MongoDB)

Design a MongoDB schema for a flexible content management system that handles various content types, media, and publishing workflows.

Functional Requirements

  • Store diverse content types (articles, pages, products, events)
  • Flexible custom fields per content type
  • Media library with metadata and variants
  • Content versioning and draft/publish workflow
  • Multi-language content support
  • Tagging, categorization, and content relationships

Non-Functional Requirements

  • Handle millions of content documents
  • Support rapid schema evolution without migrations
  • Enable full-text and faceted search
  • Maintain audit history of all changes

Questions to Consider

  • When should you embed vs reference related data?
  • How will you handle schema-less flexibility while maintaining queryability?
  • What indexing strategy supports your query patterns?
Your Solution

Document Structure Design

Design the core content document structure. Consider embedding vs referencing, handling flexible fields, and balancing read/write patterns.