0

I have to work on one Node Js project where I have to use two database in single application, One database is MongoDb and the other one is postgreSql. Till now I have only used only one dababase in one project. I just want to know that "Is it possible to use two different database as mentioned above in one Node Js project". If yes can you please provide me essential configs and plugin required to setup the project ?

1 Answer 1

1

yeah... NoSQL & another RDBMS together...because

NoSQL: fast and simple, but has little to none structure to enforce constraints on data.

RDBMS: satisfies all ACID properties, keeping your data safe and clean. But performance goes down rapidly as traffic and data set size grow.

for doing so ..

you can use an ODM (Object Document Mapper) like mongoose to deal with mongoDB

& an ORM (Object Relational Mapper) like sequalize to deal with mysql , postgre

As provided in the docs.. you got to install both

npm i -s mongoose sequelize

Sign up to request clarification or add additional context in comments.

2 Comments

Thanks for the quick response. I got my answer
Yeah... Sure I will definitely try it. Thank you

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.