Defining MongoDB Collections

The following properties apply to a MongoDB Collection object.

Tab

Property

Description

Additional Information

  Physical Name Specifies physical name of the collection  

 

Database

Specifies the database of the collection

 

 

Generate

Specifies whether a DDL statement is generated for the collection during forward engineering

 

General

 

 

 

 

 

Physical Name Specifies physical name of the collection

 

Capped Collection Specifies whether the collection is capped  
Capped Size Specifies the maximum size for a capped collection  
Capped Max Specifies the maximum number of documents for a capped collection  
Locale Specifies the ICU locale. Enter locale value as "simple" for simple binary comparison.  
Case Level Specifies whether the case comparison is included at strength level 1 or 2

 

Case First Specifies the sort order for tertiary level comparison

UPPER: Indicates that collections with uppercase is sorted before lowercase

LOWER: Indicates that collections with lowercase is sorted before uppercase

OFF: Indicates that the sorting is similar to Lower with minor difference. For more information, refer to the MongoDB documentation.

Strength Specifies the strength of the comparison level

1: Indicates that the collation performs primary level comparison and only the base characters are considered for comparison

2: Indicates that the collation performs secondary level comparison and considers both base characters and diacritics for comparison

3: Indicates that the collation performs tertiary level comparison and considers base characters, diacritics, cases and variants for comparison

4: Indicates that the collation performs quaternary level comparison and considers punctuations for comparison

5: Indicates that the collation performs identical level comparison and uses it as a tie-breaker when all other levels are equal

Numeric Order Specifies whether the numeric strings are compared as numbers or strings  
Alternative Specifies whether the collation must consider whitespace and punctuation as base characters for comparison

Non-Ignorable: Indicates that the whitespace and punctuation are considered as base characters for comparison

Shifted: Indicates that the whitespace and punctuation are not considered as base characters for comparison

MaxVariable

Specifies up to which characters are not considered as base characters when Alternative is set to Shifted

PUNCT: Indicates that both whitespace and punctuation are not considered as base characters

SPACE: Indicates that whitespace is not considered as base characters

Backwards Specifies whether strings with diacritic are compared from back to front

Normalization

Specifies whether to normalize the collection and compare text.

This option is available for MongoDB version 6.x.

timeField

Specifies field's name containing the date

This option is available for MongoDB versions 5.x and 6.x. The Time Series options are not available when the Capped Collection is enabled.

metaField

Specifies field's name containing the metadata

This option is available for MongoDB versions 5.x and 6.x. The Time Series options are not available when the Capped Collection is enabled.

Granularity

Specifies granularity parameters that improve performance by optimizing data ingestion. You can select seconds, minutes, or hours for Granularity option.

This option is available for MongoDB versions 5.x and 6.x. The Time Series options are not available when the Capped Collection is enabled.

Clustered Collection

Specifies whether the collections are clustered

This option is available for MongoDB version 6.x. The Clustered Collection option is not available when the Capped Collection is enabled.

Clustered Name

Specifies the name of the clustered collection

This option is available when the Clustered Collection is enabled.

expireAfterSeconds

Specifies whether to automatically delete documents in a time series collection

This option is available for MongoDB versions 5.x and 6.x. The Time Series options are not available when the Capped Collection is enabled.

changeStreamPreAndPostImage

Specifies whether to use change stream to output the version of a image before and after changes

True: Indicates that the change stream pre- and post-images for a collection is enabled

False: Indicates that the change stream pre- and post-images for a collection is disabled

Properties

 

 

 

 

 

MinProperties

Specifies the minimum number of properties required for the collection

 

MaxProperties

Specifies the maximum number of properties required for the collection

 

Pattern Properties

Specifies the regular expression and schema that validates an additional property

 

Dependencies

Specifies the fields whose presence allows the schema of the collection to change

 

Additional Properties

Specifies the additional field properties that are not listed in the Properties keyword

Required

Specifies the fields that are marked as mandatory fields

Schema Validator

 

 

  Generates a schema validation template

Schema Validator Template: Use this option to generate a schema validation template for the fields. For more information on generating schema validation, refer to the MongoDB: Schema Validation topic.

Cut: Use this option to cut the selected text in the schema

Copy: Use this option to copy the selected text in the schema

Paste: Use this option to paste a copied or cut text in the schema

Edit: Use this option to edit and customize the schema

Spell Check: Use this option to run an error check. Based on the results, you can correct the generated script.

Validation Action

Specifies how the schema validation rules are handled when violated

Warning: Indicates that the MongoDB logs any violations and allows insertion or update.

Error: Indicates that the MongoDB validation rejects any insert or updates that violate the validation rule.

Validation Level

Specifies the level of validations applied to the existing schema

Off: Indicates that the validation level is disabled.

Moderate: Indicates that the validation rules apply to all document inserts and updates.

Strict: Indicates that the validation rules apply to new documents and existing valid documents.