Updated on 2023-03-28 GMT+08:00

Creating a Collection

Prerequisites

You have logged in to a DDS DB instance and created a database.

Procedure

  1. On the top menu bar, choose Database Management.
  2. On the Collections tab page, click New Collection.
  3. On the displayed page, enter the collection name. Select Capped collection, Auto index, and No padding as required.

    • Capped collection: Set the maximum number of bytes and the maximum number of documents. If the specified value is reached, an error is reported. The value specified must be greater than 0.
    • Auto index: Automatically create an index on the _id field.
    • No padding: A storage policy that does not reserve storage space for the growth of a record when inserting it.

  4. Enter the validation rule, and set Validation Level and Validation Action.

    • Options for Validation Level include:
      • strict: a strict validation level.
      • moderate: a moderate validation level.
      • off: no validation level.
    • Options for Validation Action include:
      • error
      • warn

  5. Ensure that all the settings are correct and click OK. The collection you create appears in the collection list, and you can perform operations on it.