question of design ...

View: New views
2 Messages — Rating Filter:   Alert me  

question of design ...

by Régis BRULEY :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I need some advises. I have a lot of data in 250 tables.

Each table have the same desgin : Id, Date, Value (Value can be a double, boolean, varchar, or datetime depends of the table).

In my ibatis xml configuration file, i think i will pass a parameter for the table name in my select, inset, delete, update.

But what about the cache ? Can i still use cache ?

Am I right, at your sense, using one xml file for 250 tables ?

Thanks

Régis




Re: question of design ...

by Clinton Begin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Yes, the cache will work, as the table name simply becomes a query parameter. 

The only time the cache should really be avoided is if you return different sets of results (i.e. different columns with a dynamic select clause). 

Your case should work fine.   iBATIS doesn't know what a table is.  :-)

clinton

On Fri, Jul 24, 2009 at 3:04 AM, Régis BRULEY <regis@...> wrote:
Hello,

I need some advises. I have a lot of data in 250 tables.

Each table have the same desgin : Id, Date, Value (Value can be a double, boolean, varchar, or datetime depends of the table).

In my ibatis xml configuration file, i think i will pass a parameter for the table name in my select, inset, delete, update.

But what about the cache ? Can i still use cache ?

Am I right, at your sense, using one xml file for 250 tables ?

Thanks

Régis