ACID Properties and Mongo Terms

ACID property supports is the main restrict. These ACID principles determine transactions principles.

  1. Atomicity: – it means if any transaction scope fails entire transaction fails.
  2. Consistency: – it states that entire rules of the transaction must correspond as long as transaction execution. It means input and output of transaction must be consistent. Data is in a consistent state when a transaction starts and when it ends.
  3. 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.
  4. Isolation: – Each transaction scope must have distinct rules means one transaction shouldn’t affect to another one by its own rule. The intermediate state of a transaction is invisible to other transactions. As a result, transactions that run concurrently appear to be serialized. For example, in an application that transfers funds from one account to another, the isolation property ensures that another transaction sees the transferred funds in one account or the other, but not in both, nor in neither.
  5. Durability: – If any part of the transaction violates entire operations could be started over. After a transaction successfully completes, changes to data persist and are not undone, even in the event of a system failure. For example, in an application that transfers funds from one account to another, the durability property ensures that the changes made to each account will not be reversed.

Main terms in Mongo DB corresponds to CRUD

  1. Create à Insert: – is insert a document into a collection.
  2. Readà Find: – query the collection and find the documents
  3. Updateà Update: – by using this you can update the whole document or any specific ones.
  4. Delete à Remove: – by using this you can remove the single or whole document.
  5. 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.

  1. Above are BSON data type which has identifier and number associated with this the $type operator to query documents by BSON type.
Sagar-Jaybhay-Mongo-DataTypes

db.orders.employee.find({from_date:{$type:9}});

Above query return from date field for each document, it is a type of date else no result set completely.

Sagar Jaybhay, from Maharashtra, India, is currently a Senior Software Developer at Software Company. He has continuously grown in the roles that he has held in the more than seven years he has been with this company. Sagar Jaybhay is an excellent team member and prides himself on his work contributions to his team and company as a whole.

Sagar Jaybhay

Sagar Jaybhay, from Maharashtra, India, is currently a Senior Software Developer at Software Company. He has continuously grown in the roles that he has held in the more than seven years he has been with this company. Sagar Jaybhay is an excellent team member and prides himself on his work contributions to his team and company as a whole.

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *