Several development databases into 1 customer database

Hello,

I have the following situation:

My solution uses several modules and each module will use a DB-server

For example:

My Solution uses database 1
Module A uses database 2
Module B uses database 2
Module C uses database 3

When I import my solution on the customer side, I want the following situation:

My Solution uses database 1
Module A uses database 1
Module B uses database 1
Module C uses database 3

Database 3 is a system database. It needs to stay separate
So database 2 must be merged with database 1
This situation happens because I have standard modules for all customers (which are in database 2) and I have customer specific module(s), which is (are) in database 1

On customer size, I don’t have this difference. All tables from database 2 must be in database 1 on customer side.

When I use as SaaS environment I want one 1 database per customer.
Database 3 is a systemdatabase and contains all customers within Saas environment. There is a table in Database 3 that contains the server switch details (so database 1 is switched to ‘some customer name’ and database 2 is switched to ‘another customer name’), but Servoy doesn’t allow me the register 2 DB-servers with different name that have a URL that points to the same database.

So I don’t know how I can merge those 2 database.

Is there anyone with a suggestion?

Martin

Hi Martin,

This is quite easy in Servoy.

Manually move the tables from database 2 into 1 using some SQL tool, if you haven’t already done so. Then open the repository on your customer side, open the repository and select the modules affected, then there is button on the right of the window which allows you to change databases and tables for forms. So you can change all on DB 2 to DB 1 etc…

Hope this helps,

Hi Christian,

Thanks for your reply, but it is not exactly what I want.
First on customer side I don’t have Servoy Developer, so the option with the repository is not possible. In the Servoy Server Admin there is no such a function.

Second I don’t want that after each new version, that I have to make additional replaces. I need a possibility that it will be working on import of a servoy file without any additional (manual) changes

On runtime there is I think a possibility by doing the following:

databaseManager.switchServer('database1', 'customerdatabase')
databaseManager.switchServer('database2', 'customerdatabase')

The problem is that database1 and database2 need to exist in the repository and the tables (or table changes) are done in database1 and database2, but these to can’t point the to same customerdatabase in the DB Server registration

So it is not that easy in Servoy :cry:

Martin

Sorry, Martin I thought it was a one-off change.

My personal observations from trying to split stuff into several databases, is to avoid it. At one point I had 3 databases on a project:
1 UI stuff: menus, searches, navigation
2 Client data
3 Client web site stuff

I ended up merging 1 and 2 to simplify things.

We have an SaaS model solution with a number of different customers. However, we segregate the customer access using paramfilters. Do you really need a separate database for each customer? i.e. do they all have a common table structure or do they have different table requirements. If they all can use the same table structure it is very easy to update etc.

Best. K