Android Question Does jRDC2 work with MongoDB?

Widget

Well-Known Member
Licensed User
Longtime User
Are there any links for getting jRDC2 to work with MongoDB?
Is it the same as MySQL?

TIA
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

Widget

Well-Known Member
Licensed User
Longtime User
Not at all. It is not a relational database.

[B4X] Remote MongoDB Connector (RMDBC)
Not at all. It is not a relational database.

[B4X] Remote MongoDB Connector (RMDBC)

1) Why does jRDC2 only use relational databases? Why accept only SQL for server side commands? I would have hoped jRDC2 would pass the server side (MongoDB non-sql) command directly to the MongoDB engine and have it return the results, maybe as JSON.

2) I don't think the Remote MongoDB connector RMDBC will be secure enough for public access on a web server. I prefer to use some sort of middleware.

3) Does jRDC2 work with PostgreSQL databases? I'd rather use it than MySQL.

TIA
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Upvote 0

Widget

Well-Known Member
Licensed User
Longtime User
1) Why does jRDC2 only use relational databases? Why accept only SQL for server side commands? I would have hoped jRDC2 would pass the server side (MongoDB non-sql) command directly to the MongoDB engine and have it return the results, maybe as JSON.

2) I don't think the Remote MongoDB connector RMDBC will be secure enough for public access on a web server. I prefer to use some sort of middleware.

3) Does jRDC2 work with PostgreSQL databases? I'd rather use it than MySQL.

TIA

Can the SQL statements in the config.properties file reference stored procedures and stored functions from MySQL or PostgreSQL?

TIA
 
Upvote 0

OliverA

Expert
Licensed User
Longtime User
I don't think so. The client side request manager has ExecuteQuery and ExecuteBatch. On the server side ExecuteQuery uses the ExecQuery2 method of the SQL class and ExecuteBatch uses the ExecNonQuery2 method. Looking at this post (https://www.b4x.com/android/forum/threads/calling-a-mysql-stored-procedure.51312/#content), you'll need CreateCallStatment and ExecCall on the server (JRDC2) side in order to execute a stored procedure. You have two (at least two) options:
1) Modify the client side request manager and add an ExecuteStored (or whatever you want to call it) and modify the server to handle the new type of request
2) Use the modifed JRDC2 I mentioned above and make a method call.

Looking through the forum, certain stored procedures may need an additional library published by @keirS (depending on the return value of the stored procedure): https://www.b4x.com/android/forum/threads/sql-simplyfying-calling-stored-procedures.73181/#content
 
Upvote 0
Top