Query Across DBMS Boundaries (Linked Database Servers?)

[email protected] ("Dee Ayy")
Newsgroups php.db
Message-ID <[email protected]>
Is there something which can perform a query across different database systems?

It would extend the database.table.field notation to maybe
dbms.database.table.field and allow queries across MySQL and MSSQL
such as:
//$sql =
SELECT MySQLidentifier.aDatabase.aTable.aField,
MSSQLidentifier.anotherDatabase.anotherTable.anotherField
FROM MySQLidentifier.aDatabase.aTable,
MSSQLidentifier.anotherDatabase.anotherTable
WHERE MySQLidentifier.aDatabase.aTable.aKeyField =
MSSQLidentifier.anotherDatabase.anotherTable.anotherKeyField
//Or through JOINS, etc.

I've seen the linked server option in MSSQL.  Technically I can write
to MSSQL, but company policy prohibits it.  To steer clear of
ambiguity, personally I've decided that I will also not create
triggers (or any object) on MSSQL (which is a write in my mind).
Basically I will only read information from MSSQL.

I was thinking of PDO, which raises an interesting distinction of
data-access abstraction layer versus database abstraction (which as I
understand means no SQL rewrite or missing feature emulation -- SQL
rewrite example: "TOP n" prefix versus "LIMIT n" suffix).  The PDO
developers may be close to creating such a feature.
$MySQLidentifier = new PDO('mysql:host=localhost;dbname=test', $user, $pass);
$MSSQLidentifier = new PDO('mssql:host=localhost;dbname=test', $user, $pass);
$dbh = new PDO_LinkedServers($MySQLidentifier, $MSSQLidentifier);
$dbh->exec("$sql");

Looking at MSSQL's OPENQUERY syntax, I don't even know if MSSQL
provides this extended query notation.  It just seems to allow a query
on a remote (or distributed) server.

Regards.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.