Author |
Message
|
spahrson |
Posted: Fri Feb 08, 2013 12:19 am Post subject: Best way to update DB record? |
|
|
Newbie
Joined: 18 Feb 2011 Posts: 6
|
Hi all,
I need some advice.
I have to update (medium large) messages as fast as possible into a Oracle Database. The Problem, there are a lot of nested tables.
What's your suggestion to do this? Perfomantly?
I sat down with the following options:
- JPA
I'm not really happy to blow up our wmb application with a full JPA implementation like Hibernate or openJPA. Our experience doing that within WMB is not very good. What's yours?
- Using ESQL
Would end in long and confusing esql update statements with a lot of checks if value is null or not.
- Maps
I tried to avoid maps until now. I don't like this drag&drop mappings. The maintenance is wicked. I'm no quite sure if mapped updates will check if optional values are available in messages or not and out of that will update the database field or even not?
- Java Query Builder.
Because we already have a Java Object Layer within our application I tend to use Java and a mechanism to generate the SQL update statement and pass the generated SQL statement over Passthru to the database. Or should I better use the JDBC connection? |
|
Back to top |
|
 |
kash3338 |
Posted: Fri Feb 08, 2013 2:14 am Post subject: Re: Best way to update DB record? |
|
|
Shaman
Joined: 08 Feb 2009 Posts: 709 Location: Chennai, India
|
spahrson wrote: |
I have to update (medium large) messages as fast as possible into a Oracle Database. The Problem, there are a lot of nested tables. |
Where is the source message coming from? Is it another DB and is it a Sync-up operation you are trying to do? In that case, on my personal experience, I feel WMB is not the right tool to do this Sync-up. |
|
Back to top |
|
 |
smdavies99 |
Posted: Fri Feb 08, 2013 4:08 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
you missed the most obvious (well to me anyway)
Oracle Stored Procedure called from ESQL
Then all your updating can be done in a single transaction.
Not the easiest thing to develop though. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
Vitor |
Posted: Fri Feb 08, 2013 5:51 am Post subject: Re: Best way to update DB record? |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
spahrson wrote: |
What's your suggestion to do this? Perfomantly?
|
An ETL tool like Infomatica.  _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
NealM |
Posted: Fri Feb 08, 2013 10:13 am Post subject: |
|
|
 Master
Joined: 22 Feb 2011 Posts: 230 Location: NC or Utah (depends)
|
If we are voting, mine is for nested stored procedures. And you can test the heck out of them with Oracle's free SQL Developer tool. |
|
Back to top |
|
 |
spahrson |
Posted: Sun Feb 17, 2013 11:10 pm Post subject: stored procedures |
|
|
Newbie
Joined: 18 Feb 2011 Posts: 6
|
I recognize the benefit using stored procedures. There are two disadvantages for us:
1) Each message has to be sent to the database over the network (within a clustered environment) regardless whether the message should be saved at all or only partially.
2) In our company it is not appreciated to implement business logic within stored procedures.
Is the network latency negligible?
We preferred a cache instead of a database but the use of XC10 appliances failed because of financial reasons. So we have to use a database cache... |
|
Back to top |
|
 |
fjb_saper |
Posted: Sun Feb 17, 2013 11:13 pm Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
If you are at V8 you might want to handle this within a .NET node.  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|