---
title: "Discussion on \"Getting started with MongoDB transactions using Node.js\" | Hashnode"
description: "Discussion on \"Getting started with MongoDB transactions using Node.js\". The need to maintain database integrity cannot be overemphasized. One of the ways to ensure this is by performing ACID transactions; this simply means that actions that are meant to be completed as a 'whole' are either all completed or not completed ..."
url: "https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Getting started with MongoDB transactions using Node.js](https://blog.murewaashiru.com/getting-started-with-mongodb-transactions-using-nodejs?utm_source=hashnode&utm_medium=feed)

The need to maintain database integrity cannot be overemphasized. One of the ways to ensure this is by performing ACID transactions; this simply means that actions that are meant to be completed as a 'whole' are either all completed or not completed ...

Nov 25, 2021 · 11 min read · blog.murewaashiru.com  
Updated Oct 27, 2024  
Read the article

## Written by

[Murewa Ashiru](https://hashnode.com/@murewaashiru)

@murewaashiru

  
[View profile](https://hashnode.com/@murewaashiru)

Software engineer | IT Business Analyst | Technical Writer

I am a software developer and project manager; passionate about solving problems through IT.

## Responses 8

Markdown supported · ⌘↵ to post

[shivank sharma](https://hashnode.com/@ss071)

[Apr 6, 2024](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/661107256bfa2e19acd9bc2e)

thanks for sharing i had learn a lot

[Elias Soykat](https://hashnode.com/@elias-soykat)

[May 18, 2023](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/6465f5347bd6d2e2dc871188)

Hey [Murewa Ashiru](https://hashnode.com/@murewaashiru)

Can you share the above code test cases? it's definitely will helpful. I prefer mocha with chai.js.

Why need the test cases. Because mongodb some time can't rollback when transaction failed. so it's really helpful for use.

[Murewa Ashiru](https://hashnode.com/@murewaashiru)

[May 22, 2023](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/6465f5347bd6d2e2dc871188#reply-646bbe4de07e1d2187d942a4)

Hello [Elias Soykat](https://hashnode.com/@elias-soykat) I didn't write test cases for this implementation. I'd love to revisit it in my spare time but I'll probably need to do a refresher course in JS/Node (lol). I'm more into Java/Springboot recently.

[Idam Eni I](https://hashnode.com/@idam)

[Jun 14, 2022](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/62a86494349d7804a5a7dea2)

Thanks for sharing. I really appreciate your post. But i need help from you, i will like to have a chat with your directly. Thanks @Murewa Ashiru

[Murewa Ashiru](https://hashnode.com/@murewaashiru)

[May 2, 2024](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/62a86494349d7804a5a7dea2#reply-66340fb14800387f79cd3c39)

Hello Idam. Thanks a lot. Apologies for my very late response. You can reach out to me on Twitter @rachael\_xx

[MONYEI JOSHUA](https://hashnode.com/@Klyoren)

[Dec 8, 2021](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/61b01fea079fa33c08610287)

Learnt alot here, thanks.

[Offordile Victor](https://hashnode.com/@Vicman)

[Nov 27, 2021](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/61a2c2719ac0d611876afdb8)

Thanks for sharing dear.

With this, I don't really see the need to make use of SQL

[Idris Olubisi](https://hashnode.com/@olanetsoft)

[Nov 25, 2021](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/61a002499829fb749bcbf27a)

Thanks for sharing [Murewa Ashiru](https://hashnode.com/@murewaashiru)

[Tapas Adhikary](https://hashnode.com/@atapas)

[Nov 25, 2021](https://hashnode.com/posts/getting-started-with-mongodb-transactions-using-nodejs/619ed214f015481b2669c419/comment/619f0e6df015481b2669c6ef)

[Murewa Ashiru](https://hashnode.com/@murewaashiru), Thanks for sharing. Very useful.
