System and interfaces for performing document validation in a non-relational database
AssigneeMongoDB, Inc.
InventorsEliot Horowitz, David Lenox Storch, Mathias Benjamin Stearn
Life of this patent
Estimating the term…
Abstract
A system is provided that includes a document validation within a non-relational database system that is capable of reviewing documents according to one or more validation rules. The document validator may be incorporated within a non-relational database engine and may perform validation operations when one or more database functions are performed.
Claims24
A distributed computer system, comprising:
- at least one hardware-based processor operatively connected to a memory, the at least one hardware-based processor being comprised of a sampling component and a validation component and
- a database collection stored in the memory, the database collection including a plurality of documents, each of the plurality of documents defining a unit of data storage in the database collection,
- wherein, in a validation mode of operation, the at least one hardware-based processor is configured to:
- generate a random sample group of documents in the database collection by the sampling component randomly selecting documents in the database collection, a total number of documents in the random sample group being determined by the at least one hardware-based processor based on a threshold level of probabilistic certainty,
- for each randomly selected document of the random sample group of documents in the database collection:
- automatically perform, by the validation component, a validation operation on one or more data elements of the randomly selected document in response to one or both of:
- an occurrence of a regular time interval, and an occurrence of an event,
- when the validation operation determines that the randomly selected document includes a minimum set of at least one data element defined by at least one validation rule for the database collection, store the randomly selected document in the database collection, and
- when the validation operation determines that the randomly selected document does not conform with a schema for the database collection, automatically fix the randomly selected document to conform with the schema for the database collection and store the fixed document in the database collection,
- selectively perform the validation operation on one or more data elements of at least one document of the database collection responsive to an update of the at least one document,
- apply a validation rule responsive to the update, and
- perform a match negation operation of the validation rule responsive to the update,
- wherein, in a non-validation mode of operation, the at least one hardware-based processor is configured to store a document in the database collection without performing the validation operation.
A non-transitory computer-readable medium encoded with instructions for execution on a distributed computer system comprising at least one hardware-based processor operatively connected to a memory storing a database collection including a plurality of documents each defining a unit of data storage in the database collection, the at least one hardware-based processor being comprised of a sampling component and a validation component, the instructions being configured to cause the at least one hardware-based processor to perform a method comprising:
- controlling the at least one hardware-based processor to, in a validation mode of operation:
- generate a random sample group of documents in the database collection by the sampling component randomly selecting documents in the database collection, a total number of documents in the random sample group being determined by the at least one hardware-based processor based on a threshold level of probabilistic certainty, and
- for each randomly selected document of the random sample group of documents:
- automatically perform, by the validation component, a validation operation on one or more data elements of the randomly selected document of the database collection in response to one or both of:
- an occurrence of a regular time interval, and an occurrence of an event,
- when the validation operation determines that the randomly selected document includes a minimum set of at least one data element defined by at least one validation rule for the database collection, store the randomly selected document in the database collection, and
- when the validation operation determines that the randomly selected document does not conform with a schema for the database collection, automatically fix the randomly selected document to conform with the schema for the database collection and storing the fixed document in the database collection,
- controlling the at least one hardware-based processor to, in a non-validation mode of operation, store a document in the database collection without performing the validation operation,
- selectively performing the validation operation on one or more data elements of at least one document of the database collection responsive to an update of the at least one document,
- applying a validation rule responsive to the update, and
- performing a match negation operation of the validation rule responsive to the update.
Dependencies are inferred from the claim text.