How to use RedisJSON properly as a relational db? - redis

I am using RedisJSON as module on top of Redis and I wonder how I can use a javascript object properly as a relational database.

Related

Is it possible to access an SQL database migrated using Django with a JavaScript ORM instead of raw SQL for a microservice architecture?

Suppose that I have an app where the models have been created using Django ORM and Django acts like an API for authentication and gives control to the relation model User using its ORM. At the same time, we want to use Express JS to continuously update a field in one the User model for some feature that requires performance. Is it possible to use a JavaScript ORM with Express JS to update such field? If yes, then how?
In the following tutorial tutorial for Golang, the database is created using SQL and a table called go_test_model is created. Then he uses the struct called GoTestModel to create a row in the table go_test_model.
This basically means that if we create an app called api in Django and add in it a model called Example, then to handle that model in Golang we just create a struct called ApiExample and from there we can have CRUD access to the same table, there might be some conflicts in the fields datatypes between GORM and Django ORM but integrity is still applied in the database itself.
So this particular example solves my problem with Golang and can be replicated using Node JS.
You can use Sequelize for using native functions for performing queries instead of writing raw queries.
Also, please refer to Models section to define models.

How to move from PyMongo to Mongoengine

I have an existing Mongo DB that was created and managed using PyMongo. I would like to implement MongoEngine and use it from now on on the existing data.
What would be the best way to approach it? Is it possible to migrate the current DB structure to and ODM based approach using MongoEngine?

Can I use AgensGraph just to migrate data?

AgensGraph is installed and used on my other servers.
Well, I am using PostgreSQL on one server.
I would like to change that server to AgensGraph, which has a lot of data stored there.
So can I do data migration to AgensGraph like using pg_dump?
Or is there another way for task?
Yes, you can use pg_dump and also you can use FDW extension to migrate your data into AgensGraph . Example

If I use SQLAlchemy ORM, does that mean I stop querying the backend DB directly?

If I use SQLAlchemy's ORM to create objects and store them, does that mean I pretty much also only retrieve the data from the DB via SQLAlchemy? Will the underlying tables created by SQLAlchemy ORM still be sane? Can I still query the DB directly and have useful findings?
The ORM will only create and modify the database records as they're defined. You'll be able to query them just as you normally would. Using SqlAlchemy does not limit your normal database access in any way. SqlAlchemy can output the queries used into log files for seeing what exactly they're doing. It's nothing like html generation where you then don't want to look at the html it created.

Insert data to Sesame Database using SQL queries

I would like to know whether is possible to add normal data to a Sesame Database using SQL queries and retrieve them through SQL queries..??
Do you mean adding new tables to the Sesame store so that you can store non-RDF data as well? If you use Sesame's RDBMS store, then it could be possible. But it is probably not such a good idea, because it would be very easy to mess up Sesame's internal schema and put the store into an inconsistent state.
If you use Sesame's native store, then it's not possible.