Database AI
The Database AI manages your database on MongoDB Atlas. It creates collections, builds queries, and optimizes performance.
What It Does
Database AI handles all database operations, from creating collections to writing complex aggregation pipelines.
Collections
Create and manage database collections (tables) for your data.
Queries
Build complex queries and aggregations to retrieve data.
Indexes
Create indexes for faster queries on frequently accessed fields.
Security
Configure access controls and data validation rules.
How to Use It
Describe your data needs:
Creating collections
"Create a products collection with name, price, description, and category fields"
Queries
"Show me all orders from the last 30 days grouped by customer"
Performance
"Add an index on the email field in the users collection"
About MongoDB Atlas
Your data is stored on MongoDB Atlas, a fully managed cloud database:
- •Automatic backups — Your data is backed up daily
- •Scalable — Storage grows automatically as needed
- •Secure — Encrypted at rest and in transit
- •Global — Deploy in regions close to your users
Data Modeling
MongoDB uses flexible documents instead of rigid tables. The AI will help you design your data structure:
// Example: Product document
{
"_id": "prod_123",
"name": "Wireless Headphones",
"price": 79.99,
"category": "Electronics",
"specs": {
"battery": "40 hours",
"wireless": true
},
"tags": ["audio", "bluetooth", "wireless"],
"createdAt": "2024-01-15T10:30:00Z"
}Tips for Database Design
- •Describe your data relationships — "Users have many orders, orders have many items"
- •Mention performance needs — "We'll search products by name frequently"
- •The AI will suggest appropriate indexes automatically