Is there any possibility to create new tables at runtime? For example, you have different clients and every client has a own table for his products. If you create a new client, a new table for the products of the client should be created.
Maybe there could be one EntityBean "Products" which can be mapped to different tables depending on the customer I am looking for.
-
Create new Tables at runtime (5 messages)
- Posted by: Kai Manderbach
- Posted on: February 29 2004 17:33 EST
Threaded Messages (5)
- Create new Tables at runtime by David Rabinowitz on March 01 2004 03:24 EST
- Add a Client_ID field by Kai Manderbach on March 01 2004 04:49 EST
- Add a Client_ID field by David Rabinowitz on March 01 2004 07:53 EST
-
Add a Client_ID field by Tomas Inger on March 02 2004 08:41 EST
- Add a Client_ID field by Kai Manderbach on March 02 2004 11:25 EST
- Add a Client_ID field by Kai Manderbach on March 01 2004 04:49 EST
-
Create new Tables at runtime[ Go to top ]
- Posted by: David Rabinowitz
- Posted on: March 01 2004 03:24 EST
- in response to Kai Manderbach
Why not add a client_id field to the table? -
Add a Client_ID field[ Go to top ]
- Posted by: Kai Manderbach
- Posted on: March 01 2004 04:49 EST
- in response to David Rabinowitz
That could be a solution but it is not what i am looking for because there are some security aspects for this projekt.The products of each client should be seperated in different tables and every client should only have access to its own tables. So every client must have a own table. -
Add a Client_ID field[ Go to top ]
- Posted by: David Rabinowitz
- Posted on: March 01 2004 07:53 EST
- in response to Kai Manderbach
Not necessarily, you can use views on the data in side the database. Consult your database documentation for CREATE VIEW
David -
Add a Client_ID field[ Go to top ]
- Posted by: Tomas Inger
- Posted on: March 02 2004 08:41 EST
- in response to Kai Manderbach
Hi!
I suppose you don't want to give the clientes access to the table directly (using any database browser)!
If you build an application to view data, it will be simple to filter data in the application layer and only let the clients see their own data.
If you have strict security, I recommend the following: Build the application for one client, and run multiple instances. (This can give problem with data updates if the clients share a lot of other data, like lists of countries, languages etc.)
/Tomas -
Add a Client_ID field[ Go to top ]
- Posted by: Kai Manderbach
- Posted on: March 02 2004 11:25 EST
- in response to Tomas Inger
Hi!
The client should have access to his tables via a Database-Browser, so maybe I can use the Views.It is possible to run multiple instances because the client is not allowed to update tables which are shared by other clients, only the admin should do that. But running multiple instances could reduce performance, because it is a very huge application. Have you any experience running multiple instances of an application.
Thanks for your help!
Kai