Database Storage

Learn how to store encrypted data within a user account.

BlueNexus provides a secure, confidential database for storing user data. Each collection is automatically isolated per user and application, ensuring complete data privacy and security.

Key Features

  • Collection-based Storage: Organize data in named collections (e.g., "memories", "preferences", "notes")

  • Schema Validation: Optional JSON Schema validation for data integrity of structured data

  • Flexible Querying: MongoDB-style filtering, sorting, and pagination

  • Automatic Isolation: Data is automatically scoped to the authenticated user and (optionally) application

  • Complete Privacy: All data operations and storage occur within BlueNexus's confidential computing infrastructure

  • Timestamps: Inserted and updated timestamps are automatically populated in your data for better tracking and query support

Best Practices

  1. Use Schema Validation: Define JSON schemas for your collections to ensure data consistency

  2. Choose Collection Names Carefully: Use descriptive, plural names (e.g., "memories", "preferences", "notes")

  3. Use Filtering: Leverage filters instead of fetching all records and filtering client-side

  4. Implement Pagination: Always use pagination for large datasets to improve performance

  5. Handle Errors: Check response status codes and handle errors appropriately

  6. Soft delete: Consider using deleted flags, instead of actually deleting records

Last updated