ACID Properties and Mongo Terms
ACID property supports is the main restrict. These ACID principles determine transactions principles.
- Atomicity: –it means if any transaction scope fails entire transaction fails.
- Consistency: – it states that entire rules of the transactionmust correspond as long as transactionexecution. It means input and output of transaction must be consistent. Data is in a consistentstate when a transaction starts and when it ends.
- For example, in an application that transfers funds from one account to another, the consistency property ensures that the total value of funds in both the accounts is the same at the start and end of each transaction.
- Isolation: –Each transaction scope must have distinct rules means one transaction shouldn’taffect to another one by its own rule. The intermediate state of a transaction isinvisible to other transactions. As a result, transactions that runconcurrently appear to be serialized. For example, in an application thattransfers funds from one account to another, the isolation property ensuresthat another transaction sees the transferred funds in one account or theother, but not in both, nor in neither.
- Durability: –If any part of the transaction violatesentire operations could be started over. After a transaction successfully completes,changes to data persist and are not undone, even in the event of a systemfailure. For example, in an application that transfers funds from one accountto another, the durability property ensures that the changes made to eachaccount will not be reversed.
Main terms in Mongo DB corresponds to CRUD
- Create à Insert: – is insert a document intoa collection.
- Readà Find: – query the collection andfind the documents
- Updateà Update: – by using this you canupdate the whole document or any specificones.
- Delete à Remove: – by using this you canremove the single or whole document.
- Mongo Db stores data in special JSON format or BSON(Binary JSON) or binary serialization format.
Supported data Types ex like double string object and rest are present on this link read from this.
- Above are BSON data type which hasidentifier and number associated with this the $type operator to query documents by BSON type.
Above query return from date field for each document, it is a type of date else no result set completely.