Is there a Meta-SQL way to merge multiple databases into one

I have two databases, one’s MySql, one’s MSSQL, I’m using php::pdo on both, except for the sql-level idiosyncrasies, it’s manageable.I’m requesting all data from DB1, and all data from DB2, I’m looping both through an array, tossing records in, and tossing them out to larger data-set that gets fed to …

via Sql Databases Development » Search Results » ajax:

Is there a Meta-SQL way to merge multiple databases into one

I have two databases, one’s MySql, one’s MSSQL, I’m using php::pdo on both, except for the sql-level idiosyncrasies, it’s manageable.
I’m requesting all data from DB1, and all data from DB2, I’m looping both through an array, tossing records in, and tossing them out to larger data-set that gets fed to the web client.
I’m doing all of this so I can present multiple data sources to the end-user as one interface (it’s not their problem the data comes from n databases, they just want one spot to search).
Now, I’m not really a big fan of doing this, it feels dirty, but I want this to work neatly. If I change one query, I have to watch the other one. If I set it up with an ajax library, I have to make both queries match. It’s getting annoying and tricky, I’d like to just write the SQL once for one database like I do everywhere else.
What can I do to elegantly present multiple data sources as one interface?
…………………………………….

In MSSQL you can add MySQL as a linked server. That way you can create views or stored procedures in the MSSQL database that gets data from both databases.

For more info: Is there a Meta-SQL way to merge multiple databases into one

Sql Databases Development » Search Results » ajax

Is there a Meta-SQL way to merge multiple databases into one

Share this post:

Related Posts

Leave a Comment