Just a crazy idea!

Started by Hrishikesh Deshmukhalmost 21 years ago9 messagesgeneral
Jump to latest
#1Hrishikesh Deshmukh
hdeshmuk@gmail.com

Is it possible to connect a DB in Postgresql to a DB in MySQL!
I know its a crazy idea!
H

#2Dann Corbit
DCorbit@connx.com
In reply to: Hrishikesh Deshmukh (#1)
Re: Just a crazy idea!

Of course it is possible. In fact, it's easy.

Just use JDBC or ODBC or OLEDB or a .NET provider and join to both
database systems.

There is nothing to it.

I can make a join where tables from RMS and DB/2 and Oracle and
PostgreSQL and MySQL are all participating in the SQL statement with
ease.

This technology is 15 years old.

-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
owner@postgresql.org] On Behalf Of Hrishikesh Deshmukh
Sent: Thursday, May 26, 2005 2:05 PM
To: Postgresql-General
Subject: [GENERAL] Just a crazy idea!

Is it possible to connect a DB in Postgresql to a DB in MySQL!
I know its a crazy idea!
H

---------------------------(end of

broadcast)---------------------------

Show quoted text

TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

#3Hrishikesh Deshmukh
hdeshmuk@gmail.com
In reply to: Dann Corbit (#2)
Re: Just a crazy idea!

Could you point to documentation regarding this. This would be a big help.

Thanks,
Hrishi

Show quoted text

On 5/26/05, Dann Corbit <DCorbit@connx.com> wrote:

Of course it is possible. In fact, it's easy.

Just use JDBC or ODBC or OLEDB or a .NET provider and join to both
database systems.

There is nothing to it.

I can make a join where tables from RMS and DB/2 and Oracle and
PostgreSQL and MySQL are all participating in the SQL statement with
ease.

This technology is 15 years old.

-----Original Message-----
From: pgsql-general-owner@postgresql.org [mailto:pgsql-general-
owner@postgresql.org] On Behalf Of Hrishikesh Deshmukh
Sent: Thursday, May 26, 2005 2:05 PM
To: Postgresql-General
Subject: [GENERAL] Just a crazy idea!

Is it possible to connect a DB in Postgresql to a DB in MySQL!
I know its a crazy idea!
H

---------------------------(end of

broadcast)---------------------------

TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faq

#4Dawid Kuroczko
qnex42@gmail.com
In reply to: Hrishikesh Deshmukh (#1)
Re: Just a crazy idea!

On 5/26/05, Hrishikesh Deshmukh <hdeshmuk@gmail.com> wrote:

Is it possible to connect a DB in Postgresql to a DB in MySQL!
I know its a crazy idea!

Why, of course. Been' doing that.

All you need is to write a set of functios, for example in PL/perlU,
some of them being set returning functions.

For my purposes I did a function which connects to mysql to
call its encrypt function, and a function which returns "show databases"
and similar stuff.

Basically -- yes you can do it, though things getting tricky if you want
to have _read_ access to _big_ tables. :)

Regards,
Dawid

PS: For the reference, why do you need to connect to mysql?

#5Hrishikesh Deshmukh
hdeshmuk@gmail.com
In reply to: Dawid Kuroczko (#4)
Re: Just a crazy idea!

I have a little schema in pgsql and some annotation in mysql; either
way transfer of schema might result in data types etc conflicts. So if
i could make these two talk then i don't have to worry about schema
transfer. So the question and frankly i thought it was crazy thought!
The replys so far indicate that i am not looney at all ;)

Hrishi

Show quoted text

On 5/26/05, Dawid Kuroczko <qnex42@gmail.com> wrote:

On 5/26/05, Hrishikesh Deshmukh <hdeshmuk@gmail.com> wrote:

Is it possible to connect a DB in Postgresql to a DB in MySQL!
I know its a crazy idea!

Why, of course. Been' doing that.

All you need is to write a set of functios, for example in PL/perlU,
some of them being set returning functions.

For my purposes I did a function which connects to mysql to
call its encrypt function, and a function which returns "show databases"
and similar stuff.

Basically -- yes you can do it, though things getting tricky if you want
to have _read_ access to _big_ tables. :)

Regards,
Dawid

PS: For the reference, why do you need to connect to mysql?

#6Matt Miller
mattm@epx.com
In reply to: Hrishikesh Deshmukh (#5)
Re: Just a crazy idea!

On Thu, 2005-05-26 at 17:21 -0400, Hrishikesh Deshmukh wrote:

I have a little schema in pgsql and some annotation in mysql;
...
if i could make these two talk
...
So the question and frankly i thought it was crazy thought!
The replys so far indicate that i am not looney at all ;)

Well the replies seem to indicate that the question does have an
affirmative answer. Whether Hrishikesh is looney, however, is probably
still an open question ...

#7Hrishikesh Deshmukh
hdeshmuk@gmail.com
In reply to: Matt Miller (#6)
Re: Just a crazy idea!

LOL..............not looney!

Show quoted text

On 5/26/05, Matt Miller <mattm@epx.com> wrote:

On Thu, 2005-05-26 at 17:21 -0400, Hrishikesh Deshmukh wrote:

I have a little schema in pgsql and some annotation in mysql;
...
if i could make these two talk
...
So the question and frankly i thought it was crazy thought!
The replys so far indicate that i am not looney at all ;)

Well the replies seem to indicate that the question does have an
affirmative answer. Whether Hrishikesh is looney, however, is probably
still an open question ...

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

#8David Fetter
david@fetter.org
In reply to: Hrishikesh Deshmukh (#1)
Re: Just a crazy idea!

On Thu, May 26, 2005 at 05:04:37PM -0400, Hrishikesh Deshmukh wrote:

Is it possible to connect a DB in Postgresql to a DB in MySQL! I
know its a crazy idea!

It's called DBI-Link.

http://pgfoundry.org/projects/dbi-link/

Cheers,
D
--
David Fetter david@fetter.org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

#9Jeff
threshar@torgo.978.org
In reply to: Hrishikesh Deshmukh (#1)
Re: Just a crazy idea!

On May 26, 2005, at 5:04 PM, Hrishikesh Deshmukh wrote:

Is it possible to connect a DB in Postgresql to a DB in MySQL!
I know its a crazy idea!
H

http://pgfoundry.org/projects/dbi-link/

although you'll need a patch to make it work unless the author has
updated it.

--
Jeff Trout <jeff@jefftrout.com>
http://www.jefftrout.com/
http://www.stuarthamm.net/