cancel
Showing results for 
Search instead for 
Did you mean: 

Using JDBC and JPA together ?

Former Member
0 Kudos

One of my applications has a lot of static tables and together with it there are dynamic tables that would get generated during the runtime.

The following are the few points I would like to clarify from experts before finalizing the application architecture.

If I use SAP Dictionary projects for the static tables, then I would end up creating the tables in the default database schema that is configured for the CE server. Due to the Open SQL restriction over DDL, I would not be able to create my dynamic tables under the same schema. So, I would require another DB schema to be created just for creating / operating upon these Dynamic tables..

One way I could think of to avoid the existence of two schema just for this one application, is by creating a new schema which will contain both the static tables as well as the dynamic tables.i.e creating all the tables through DDL scripts directly. But, by this way the deployment of application tables across QA and PROD would have to be done manually since Dictionary projects are not being used..

How to address this issue?

Also, to operate upon the dynamically created tables, we will have to use JDBC.. So, what could be the best way to handle this. JPA for static tables and JDBC for dynamic tables?

Any pointers on this will be highly appreciated..

PS: The dynamic tables would just contain some runtime values and there will not be any relationships between the dynamically created tables. These tables would contain basically some kind of rules set up by the administrator and this data would be used by the application during runtime.

Bala

Accepted Solutions (1)

Accepted Solutions (1)

Vlado
Advisor
Advisor
0 Kudos

Hi Bala,

Not sure if you already sorted this out, but just thought I could share a proposal.

> One way I could think of to avoid the existence of two schema just for this one application, is by creating a new schema which will contain both the static tables as well as the dynamic tables.i.e creating all the tables through DDL scripts directly. But, by this way the deployment of application tables across QA and PROD would have to be done manually since Dictionary projects are not being used..

>

> How to address this issue?

>

Why not just create a custom data source to the system DB schema (this is what you call default ), configured for Native SQL or Vendor SQL? Thus you can still have Dictionary (static) tables deployed/created in the same schema as the dynamic ones.

\-- Vladimir

Former Member
0 Kudos

Thanks Vladimir for the response. I've solved it already exactly in the same way you've mentioned.

Answers (0)