Connecting and querying multiple databases containing same schema.

10 views
Skip to first unread message

Abhishek Jain

unread,
Oct 14, 2016, 12:37:23 AM10/14/16
to Mongoose Node.JS ODM
Hi Team,

I recently developed an admin portal for B2C and now want to white label it. Can you tell me how can I create multiple databases on a single server?

My approach for using these databases:

mongo_client1
mongo_client2
mongo_client3

Reason for doing so was to make existing code in use. I have lot of validations and a customer can register at both mongo_client1 and mongo_client2 with same mail id.

Problem?
I am not able to connect to all the DB in one go for my super user.

-Super User (can access everything)
--Client1 (uses mongo_client1)
---CustomerA
---CustomerB
---CustomerC
---CustomerD
--Client2 (uses mongo_client2)
---CustomerA
---CustomerC
---CustomerE
---CustomerF
--Client2 (uses mongo_client2)
---CustomerP
---CustomerQ
---CustomerR
---CustomerS


Thanks.
Reply all
Reply to author
Forward
0 new messages