BlogAnnounced at MongoDB.local NYC 2024: A recap of all announcements and updatesLearn more >>
MongoDB Developer
JavaScript
plus
Sign in to follow topics
MongoDB Developer Centerchevron-right
Developer Topicschevron-right
Languageschevron-right
JavaScriptchevron-right

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

23 min • Published May 14, 2021
JavaScript
Facebook Icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
✅ Sign-up for a free cluster at: https://mdb.link/free-bdS03tgD2QQ ✅ Get help on our Community Forums: https://mdb.link/community-bdS03tgD2QQ 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

Facebook Icontwitter iconlinkedin icon
Rate this video
star-empty
star-empty
star-empty
star-empty
star-empty
Related
Code Example

EnSat


Feb 08, 2023 | 3 min read
Code Example

Build a Simple Website with React, Axios, and a REST API Built with MongoDB Atlas App Services


Jan 26, 2023 | 4 min read
Tutorial

Developing a Web Application with Netlify Serverless Functions and MongoDB


Feb 03, 2023 | 6 min read
Quickstart

Using the Atlas Data API with Google Apps Script


Jun 12, 2023 | 9 min read