JavaScript
MongoDB Developer Centerchevron-right
Developer Topicschevron-right
Languageschevron-right
JavaScriptchevron-right

MongoDB & Node.js: Create an ACID Transaction (Part 3 of 4)

Published May 14, 2021
JavaScript
Copy Link
facebook icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
In part three of this quick start tutorial for developers, Lauren Schaefer explains how to create ACID (atomicity, consistency, isolation, durability) transactions for MongoDB in a Node.js script. She explains how to use withTransaction() and a session to successfully complete or abort a transaction. Chapters: 00:00 Intro 01:06 ACID transactions in MongoDB 04:06 The Setup 05:19 Create a Transaction 05:43 Create a Helper Function 07:50 Create a Function for the Transaction 17:59 Call the Function 20:54 Wrapping Up Other videos in this tutorial series: Part 1: https://youtu.be/fbYExfeFsI0 Part 2: https://youtu.be/iz37fDe1XoM Links Lauren mentions in the video: Lauren's blog post: How to Use MongoDB Transactions in Node.js https://developer.mongodb.com/quickstart/node-transactions Lauren's GitHub repo with the code from this video https://github.com/mongodb-developer/nodejs-quickstart/blob/master/transaction.js Lauren's script to create a "users" collection https://github.com/mongodb-developer/nodejs-quickstart/blob/master/usersCollection.js Node.js & MongoDB Starter Template File https://github.com/mongodb-developer/nodejs-quickstart/blob/master/template.js MongoDB Documentation: Convert a Standalone to a Replica Set https://docs.mongodb.com/manual/tutorial/convert-standalone-to-replica-set Connect with Lauren: Twitter: https://twitter.com/lauren_schaefer​ TikTok: https://tiktok.com/@lauren_schaefer​ Linkedin: https://www.linkedin.com/in/laurenjan...​ MongoDB Community: https://developer.mongodb.com/community/forums/t/hey-friends-im-lauren/168/ Subscribe to MongoDB ►►► https://bit.ly/3bpg1Z1 Connect with MongoDB: Website: https://bit.ly/2LjtNBZ Twitter: https://bit.ly/3fH87gR Facebook: https://bit.ly/3fEaIsd Linkedin: https://bit.ly/2SY9w90 Instagram: https://bit.ly/3bn9bDv Community Forums: https://bit.ly/2I8VCi5 TikTok: https://bit.ly/3fHoqdJ
All MongoDB Videos

Copy Link
facebook icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
Related
Tutorial
Capturing Hacker News Mentions with Node.js and MongoDB

May 16, 2022
Tutorial
Use MongoDB as the Data Store for your Strapi Headless CMS

Sep 23, 2022
Quickstart
How to Use MongoDB Transactions in Node.js

Sep 23, 2022
Tutorial
Accessing Atlas Data in Postman with the Data API

Aug 26, 2022