Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > Architecture> Writing database queries across different services
 

Pages: 1
Architecture
Writing database queries across different services
Page:1/1 

  Print all messages in this thread  
Poster Message
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 28-Feb-2013 19:39:27.  
Code:
SELECT
    *
FROM
    tbl_order o
INNER JOIN
    tbl_contact c
ON
    c.ContactId = o.BillingContactId


The above query for an e-commerce store is nice and simple.

If I were to move all of my contacts data into a CRM such that its stored in a different database and the e-commerce database references contacts via a guid and fetches their data via a WCF service, how would I create an equivalent query?

Would this be too slow and ought I instead keep a copy of the contacts data in the e-commerce database?
  Top
Walaa
Support Team



Location:

Joined on:
21-Aug-2005 16:03:48
Posted:
14585 posts
# Posted on: 01-Mar-2013 12:34:40.  
I vote against copying the contacts data.
Was it proved to be slow calling the WCF service?


  Top
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 01-Mar-2013 12:39:54.  
I haven't tried it yet. How would the equivalent query be written?
  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8109 posts
# Posted on: 02-Mar-2013 07:09:08.  
Ian wrote:
I haven't tried it yet. How would the equivalent query be written?

I don't understand that question. I mean: if you have two tables on different DBs and you access the 'contact' table with a service, then I only can think on running your SELECT 'tbl_order', then with those contact_id you should look for them in the other service and do a lookup text/combo in your GUI. Am I missing something?


David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Ian
User



Location:
Hertfordshire, UK
Joined on:
01-Apr-2005 16:37:36
Posted:
511 posts
# Posted on: 02-Mar-2013 11:28:04.  
I guess not. I wasn't sure whether there was a fancier way of doing it.
  Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.