|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Preferred way of accessing a database in IIB10 |
« View previous topic :: View next topic » |
Author |
Message
|
leao |
Posted: Thu Dec 06, 2018 5:46 am Post subject: Preferred way of accessing a database in IIB10 |
|
|
Newbie
Joined: 06 Dec 2018 Posts: 6
|
I'm new with IIB and I'm mostly doing tutorials at the moment. In the tutorials from IBM Training, they use a Database/Compute Node together with ESQL to interact with databases, while in the tutorials from IBM BetaWorks, they use the Mapping Node to do the same.
What is the preferred way of interacting with databases in IIB? |
|
Back to top |
|
 |
Vitor |
Posted: Thu Dec 06, 2018 5:53 am Post subject: Re: Preferred way of accessing a database in IIB10 |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
leao wrote: |
What is the preferred way of interacting with databases in IIB? |
The one that best fits your design.
Seriously.
If you've elected to use a Mapping node, there's no reason why you should add a Compute node or an ESQL function just to get a return set. Likewise if you're writing ESQL there's no point adding a Mapping node just to get to a database.
The only time you might find yourself drawn one way or the other is if you have a seriously complex SQL query that's cumbersome to express in a Mapping node. But I would put it to you that firstly, with data that complex you might be inclined to avoid the Mapping node anyway and secondly, complex SQL queries should be put in stored procedures irrespective of how they're invoked. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
leao |
Posted: Thu Dec 06, 2018 6:04 am Post subject: |
|
|
Newbie
Joined: 06 Dec 2018 Posts: 6
|
How do I know which best fits my design? It's this "election process" that confuses me. I can't seem to find any information on which situations I should use one or the other.
I guess I'm asking for a brief comparison of the strengths and weaknesses of the Mapping node versus the Database and Compute nodes? |
|
Back to top |
|
 |
fjb_saper |
Posted: Thu Dec 06, 2018 6:09 am Post subject: |
|
|
 Grand High Poobah
Joined: 18 Nov 2003 Posts: 20756 Location: LI,NY
|
leao wrote: |
How do I know which best fits my design? It's this "election process" that confuses me. I can't seem to find any information on which situations I should use one or the other.
I guess I'm asking for a brief comparison of the strengths and weaknesses of the Mapping node versus the Database and Compute nodes? |
Go back to your design board, look at the examples and understand that even though all 3 nodes access the database they fulfill a different purpose.
The Mapping node can access a DB to supplement the mapping of the message.
The compute node is the most flexible as you can deal with the DB return as you wish.
The Database node fills a certain need that is clearly shown in the examples.
Have fun  _________________ MQ & Broker admin |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|