You would want to copy / transform the data from one database to the other. That allows you to store it in the new DB in a manner to is best for your query while seperating the two application stores and isolating each against changes to the other.
The schema of the two applications will vary over time, and not having one application depending on the schema of another is a good thing. In this model, the only failure would be the replication... each application would continue to operate correctly. The "Enterprise Integration Patterns" book is a solid reference for these situations. On Mon, Feb 15, 2010 at 7:33 AM, F.B. ten Kate <[email protected]> wrote: > And why is it bad? > > It's two completely seperate systems. There is no actual reference > beeing mapped accross the databases. What i am doing is using a > subquery to identify Invoices which qualify. There simply is no way to > do this without querying two databases. Unless i put both the systems > in one database which is not an option. Unless i am completely missing > some practise here which i am not implementing. > > Greetings, > > Folkert > > On 15 feb, 14:23, Greg Young <[email protected]> wrote: > > Integration through databases is just plain bad. I would reconsider > > heavily what you are doing. > > > > On Mon, Feb 15, 2010 at 3:18 PM, F.B. ten Kate <[email protected]> > wrote: > > > > > > > > > I've got something i want to implement but i am not sure if it's > > > possible, and if it is how to go about it. > > > > > Basically we have a couple of applications running with their own > > > databases. These databases in some cases have reference fields to > > > other databases (not proper FK's at this point in time but still). > > > > > Now what i would like/want/need is to use the same mapping files, what > > > i mean is for example we have in one databases, orders, invoices, > > > buyers etc. > > > > > If a buyer is late with payment the profile gets moved to our > > > "collecting" department. A Collection / Claim then gets a direct > > > reference to an Invoice_ID. > > > > > Now currently i have the following mapping: > > > > > <?xml version="1.0" encoding="utf-8" ?> > > > <hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" > > > assembly="Webcasso.Backoffice.Entities" > > > namespace="Webcasso.Backoffice.Entities" > > > schema="Webcasso_develop.dbo"> > > > <class name="Claim" table="tbl_Incasso_Vordering"> > > > <id name="ID" column="Incasso_Vordering_ID"> > > > <generator class="native" /> > > > </id> > > > <property name="DirectpayInvoiceID" > column="DP_Factuur_ID" /> > > > <many-to-one column="Incasso_ID" fetch="join" > lazy="false" > > > name="Collection" class="Collection"/> > > > </class> > > > </hibernate-mapping> > > > > > This works perfectly since at the moment the two databases are running > > > on the same server. Due to the size however this will not always be > > > the case, meaning i'd implement a linked server to the server holding > > > the "Webcasso_develop" database. > > > > > Now from what i understand i can alter the schema and add the linked > > > server to it, this means however that i'd get two mapping files: > > > > > - Mapping file to map the Claim to invoices on the Invoice Database. > > > - Mapping file to map the claim on the claim database (without a > > > linked server) > > > > > Is there a way to set a linked server name for a assembly holding the > > > mappings? This way i have the same mappings i use when querying > > > through a linked server as i'd have when querying from a direct > > > connection to this server. (IE, Querying from the Invoices application > > > against the Claim database or Querying the Claim database directly.) > > > > > That way i can just have one centralized mapping instead of having two > > > that i need to be keeping up to date. > > > > > If this doesn't make sense people tell me how and i'll attempt to > > > ellaborate. > > > > > Hope someone can point me in the right direction. > > > > > Thanks in advance & Greetings, > > > > > F.B. ten Kate > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "nhusers" group. > > > To post to this group, send email to [email protected]. > > > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > > > For more options, visit this group athttp:// > groups.google.com/group/nhusers?hl=en. > > > > -- > > Les erreurs de grammaire et de syntaxe ont été incluses pour m'assurer > > de votre attention > > -- > You received this message because you are subscribed to the Google Groups > "nhusers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<nhusers%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/nhusers?hl=en. > > -- You received this message because you are subscribed to the Google Groups "nhusers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/nhusers?hl=en.
