Connection string questions with multiple DB's


(gmurt) #1

Hi there,

I’m thinking of moving my code over to Relativity but have a couple of questions…

We write restaurant software and have a MySQL instance running on Amazon with many databases within it which all have an identical structure. i.e. each restaurant has it’s own seperate database.

I’ve linked up Relativity to our server and I’ve set up a schema called “Restaurant” and added 2 connections into this schema which point to 2 restaurant database (identical db structures as explained above)

How does the client let the Relativity Server know which connection to use within the schema? Am I approaching this in the wrong way, should I have a schema set up for each restaurant with a single connection defined in each?

I’d prefer to have a single schema if possible, it would just keep things a lot neater.

Hopefully I’ve give enough information but please ask if I’ve missed anything out.

I’m using XE7 and the latest version of DataAbstract and Relativity downloaded from the site.

Thanks in advance for any replies!

Kind regards,
Graham


(gmurt) #2

Just found this, sorry should have searched first…
http://talk.remobjects.com/t/change-connection-in-relavitiy-client/709


(gmurt) #3

Ok, I thought that post would help but I’m not sure it has. From the above post I understand that using a single schema with multiple connections, then choosing a connection from the client is not possible.

However, I’m confused as to what the best suggestion is. Initially there will be about 100 restaurants connected to this server, I hope I do not have to have 100 of each table in the database, all with a different connection set in the Table.Statements? This would not work for us as the DB has about 30 tables. I hope there’s a more suitable way to do this.

Thanks,
Graham


Using events in Relativity Server to change ConnectionName
(antonk) #4

Hello

Afraid the only option here is to write a custom Data Abstract server.

Unfortunately your case doesn’t fit will with Relativity Server features, at least now. While we could provide possibility to set desired connection name when the user logs on (via user’s LoginEx string) such feature would be a serious security threat. F.e. in your case malicious user could modify his LoginEx string and get access to someone other’s database.

Regards