Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


How to do transaction/locking in mongodb?



How to do transaction/locking in mongodb?..

Answer / Anju Upadhyay

MongoDB supports multi-document transactions starting from MongoDB 4.0, but it does not support row-level locking as seen in traditional relational databases.nTo perform a multi-document transaction, you can use the beginTransaction and commitTransaction methods within a session. The isolation level is set to snapshot isolation by default, which ensures that transactions see a consistent snapshot of data during their execution.nFor better concurrency control, you can also implement optimistic locking using versioning or timestamp fields in your documents.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More MongoDB Interview Questions

Is it required to call ‘getlasterror’ to make a write durable?

1 Answers  


What is odm in mongodb?

1 Answers  


Which language is used in mongodb?

1 Answers  


How do I do transactions/locking in mongodb?

1 Answers  


Compare mongodb and couchdb at high level?

1 Answers  


Can you edit long shell operations with an external text editor?

1 Answers  


What is difference between mongodb and dynamodb?

1 Answers  


If you remove an object attribute, is it deleted from the database?

1 Answers  


What is a table called in mongodb?

1 Answers  


When an object attribute is removed, is it deleted from the store?

1 Answers  


Can journaling features be used to perform safe hot backups?

1 Answers  


Is mongodb object oriented?

1 Answers  


Categories