MongoDB数据库专家Skill mongodb

提供专业的 MongoDB 数据库设计、聚合管道构建、索引优化与性能调优服务。专注于 NoSQL 数据库模式、数据建模、查询优化及集群配置,助力高效后端开发与数据管理。关键词:MongoDB,数据库设计,聚合管道,索引优化,NoSQL,数据建模,性能调优,后端开发。

后端开发 0 次安装 0 次浏览 更新于 2/26/2026

名称: mongodb 描述: MongoDB 数据库模式设计、聚合管道、索引策略与性能优化。 允许工具: 读取、写入、编辑、Bash、Glob、Grep

MongoDB 技能

提供 MongoDB 数据库设计与操作的专家级协助。

能力范围

  • 设计文档模式
  • 构建聚合管道
  • 创建最优索引
  • 实施数据建模模式
  • 配置复制与分片

聚合管道示例

const results = await collection.aggregate([
  { $match: { status: 'active' } },
  { $group: { _id: '$category', total: { $sum: '$amount' } } },
  { $sort: { total: -1 } },
  { $limit: 10 },
]).toArray();

索引示例

// 复合索引
await collection.createIndex({ userId: 1, createdAt: -1 });

// 文本索引
await collection.createIndex({ title: 'text', content: 'text' });

目标流程

  • mern-stack-开发
  • 数据库设计
  • 后端开发