List:Internals« Previous MessageNext Message »
From:Brian Aker Date:April 13 2006 2:35pm
Subject:Re: Oracle support
View as plain text  
Hi!

A couple of quick thoughts for you.

Personally I would do something with Java and JNI before going  
through OCI. It would be much more flexible. No matter how you do it  
though, I would recommend going through the code of the federated  
engine and look and see how it generates SQL statements. The file you  
want to look at is ha_federated.cc and it lives in the sql directory.

Cheers,

	-Brian

On Apr 13, 2006, at 6:44 AM, Chad wrote:

> Hello,
>
> I recently created a table handler (before I cam across federated) 
> that has the ability to connect and select data from an oracle data  
> source (using OCI).  I did it in a way that I think would be easy  
> to support other databases such as postgres, db2, etc without  
> changing much code in the handler.  I've created a DBH class that  
> has database specific connection handlers like DBH_Oracle and Sth  
> which has classes derived like Sth_Oracle for handling database  
> specific cursors.  In this way, the hander has to know very little  
> about each external datasource and those details can be handled by  
> the specific driver.  This could probably also be done generically  
> with ODBC, but I thought OCI might provide better performance.
>
> I've only been working on it for about two weeks so it is still a  
> bit primitive and only supports selects (and full table scans at  
> that) but does deal with LOBs, dates, etc appropriately.  The  
> oracle driver also handles INSERT,SELECT,UPDATE, DELETE, BEGIN...  
> etc, I just havn't added the support in the handler yet.  I thought  
> I would email here before I go much further because I just came  
> accross the federated engine and I see that this is the aim of that  
> engine.  Is anyone here is currently working on that project and  
> would like to work together to add Oracle support to MySQL or has  
> this already been done somewhere and I am wasting my time inventing  
> something that has already been invented?
>
> Thanks,
>
> Chad Cramer, Programming Manager
> Tucows, www.tucows.com
> Grand Blanc, MI. USA
> ccramer@stripped
>
> -- 
> MySQL Internals Mailing List
> For list archives: http://lists.mysql.com/internals
> To unsubscribe:    http://lists.mysql.com/internals? 
> unsub=brian@stripped

--
_______________________________________________________
Brian "Krow" Aker, brian@stripped
Seattle, Washington
http://krow.net/
http://askbrian.org/
_______________________________________________________
You can't grep a dead tree.

Thread
Oracle supportChad13 Apr
  • Re: Oracle supportBrian Aker13 Apr