Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Joining WebServices and SQL

 
varnika Raman
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I have a situation where I need to access both SQL and Webservice from a single query.

This is how it looks,

select gene_name, protein_name from Gene,Protein

Client will send this query to my middle Tier.
Here Gene table is in the Oracle , but Protein is not with us. I have to make a webservice call to get the Protein result from some other institution.

Please suggest me an efficient way to do it.

Thanks
Varnika
 
Jeroen Wenting
Ranch Hand
Posts: 5093
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're effectively writing your own query language (and all that goes with it).
You'll need a parser that in some way knows where to send each query and for which data.
In this case you'll need to query 2 distinct databases from the same query and in some way combine the results to make sense.

What's the relation between the fields, why are they requested together in one query anyway (OK, I remember from biology what a possible relationship might be but is it expressed somewhere in your data in a way your application can use to link rowID 1242522 from the gene table in database A with rowID 6346225 from the protein table in database B?)?
Unless you also maintain some sort of indexing and relationship somewhere your application has no way of knowing so you need an indexing and key server as well.

All combined you're effectively writing your own distributed database server. Might be easier to just buy some addon product for your existing Oracle database so that one can handle it all for you, I'm pretty certain such things exist somewhere.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic