Multiple databases support

Hi!

I have this(previous thema is closed) question from development perspective, how to use DGraph in development? With other databases most people use dev and test databases locally (dev to develop against, where they have some mock data and test for clean testing ).

The solution, according to other threads is still to use different databases for any logical separation. Means starting a new database for new project, using different databases for dev and test environment. Means actually, I need 2 databases(1 per project) and third testing(which can be shared, because any test will drop all data afterwards) database. Is it right and a way to handle it?

Before anything take a read of this issue Support Multi-Tenancy · Issue #2693 · dgraph-io/dgraph · GitHub

In Dgraph you can create a “tree” as a structure representing different DBs. To clear each tree you could create a Recurse Query that would locate all nodes of that tree and then delete all of it in a second batch.

And it would also be interesting if each “DB tree” had a prefix like “db1.name”. To maintain different indexing. This would avoid finding Nodes of different trees.

This would be feasible in a small test framework. If it’s too big, I think you’re wasting a lot of time and your Schema would become a giant.

The best way is to have different Alphas in different separate contexts. Is simple.

Cheers.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.