comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » SQL access without Dataminer
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
SQL access without Dataminer [message #33927] Sat, 08 February 2003 12:04 Go to next message
Jonathan Greenberg is currently offline  Jonathan Greenberg
Messages: 91
Registered: November 2002
Member
Does anyone know if IDL has any SQL access capability without purchasing
Dataminer? Are there any freeware SQL interface libraries for IDL?

--j

--
Jonathan Greenberg
Graduate Group in Ecology, U.C. Davis
http://www.cstars.ucdavis.edu/~jongreen
http://www.cstars.ucdavis.edu
AIM: jgrn307 or jgrn3007
MSN: jgrn307@msn.com or jgrn3007@msn.com
Re: SQL access without Dataminer [message #33979 is a reply to message #33927] Tue, 11 February 2003 16:44 Go to previous messageGo to next message
Randall Skelton is currently offline  Randall Skelton
Messages: 169
Registered: October 2000
Senior Member
I have written some very raw DLMs that emulate postgres' libpq functions.
The library is in a bit of a state of flux as I have been slowly adding
multi-threaded connection support, blobs, and vectorizing. It works under
*nix.

There are very general problems involved when you start desiring
cross-platform database access. Firstly, you need to be careful
about binary conversions or simply stick to ascii returns. Secondly,
while ODBC/JDBC are the obvious choices for communication, last time I
checked there weren't any free cross-platform libraries. Both of the
above libraries provide hooks for easy casting which is a real pain to
sort out with the raw C libraries for postgres and mysql. That being
said, I quite like the speed I can get out of my libpq wrappers when used
in multi-threaded mode ;) The OBDC drivers for postgres cannot compare.

The short answer is that while $500 US seems like a lot up front, anyone
who thinks they can write a database interface for less (time=$$$) is
probably kidding themselves. It took me 2 weeks to get version 1 of my
postgres DLM working and the interface is nowhere near as easy to use as
the dataminer. I don't even want to begin adding up the hours of bug
fixing, vectorizing, trapping that I've done since version 1.

>> Does anyone know if IDL has any SQL access capability without purchasing
>> Dataminer? Are there any freeware SQL interface libraries for IDL?

Yes. I can send you my postgres DLMs if you wish. They work for *nix and
are sent as source for you to compile.

> I'm interested in this too. I have some IDL -> Database -> Web
> applications in mind, so I started to learn PHP and MySQL, which are
> both pretty easy to use (and free!) Plus, they have very nice (also
> free) web-based administration programs out there. The IDL DataMiner
> (~$500 US) claims support for SQL and ODBC. Without too much
> investigation, it seems to me that the core SQL grammar and MySQL
> grammar are similar if not identical.

They are subtly different. The debate regarding the level of SQL
compliance is too detailed to get into here. Each of the big 3
(postgersql, mysql, oracle) has their own syntax quirks and their own
low-level programming APIs. This is why OBDC and JDBC are popular.

> I haven't tested the overlap of
> the database-connection methods between the two, but they must be
> somewhat similar.

Their APIs are all similar as they each provide database access but
they are completely independent C/C++ libraries.

> In my opinion, it would be great if IDL DataMiner would support MySQL
> explicitly (how hard could it be for them to do this?). Failing that,
> it may be possible to develop some PHP code from the command line to
> take SQL/MySQL queries generated within IDL and return results
> somehow.

OBDC/JDBC are designed as abstractions libraries and and provide a
standard interface. Developers for each database simply emulate the OBDC
functionality using a subset of their own raw libraries. You could very
well write DLM wrappers around the mysql C libraries to get the same
functionality that I have with postgres.
Re: SQL access without Dataminer [message #34015 is a reply to message #33927] Mon, 10 February 2003 09:55 Go to previous messageGo to next message
MKatz843 is currently offline  MKatz843
Messages: 98
Registered: March 2002
Member
Jonathan Greenberg <greenberg@ucdavis.edu> wrote in message news:<BA6AA308.13375%greenberg@ucdavis.edu>...
> Does anyone know if IDL has any SQL access capability without purchasing
> Dataminer? Are there any freeware SQL interface libraries for IDL?
>
> --j

I'm interested in this too. I have some IDL -> Database -> Web
applications in mind, so I started to learn PHP and MySQL, which are
both pretty easy to use (and free!) Plus, they have very nice (also
free) web-based administration programs out there. The IDL DataMiner
(~$500 US) claims support for SQL and ODBC. Without too much
investigation, it seems to me that the core SQL grammar and MySQL
grammar are similar if not identical. I haven't tested the overlap of
the database-connection methods between the two, but they must be
somewhat similar.

In my opinion, it would be great if IDL DataMiner would support MySQL
explicitly (how hard could it be for them to do this?). Failing that,
it may be possible to develop some PHP code from the command line to
take SQL/MySQL queries generated within IDL and return results
somehow.

Any takers?

M. Katz

Some useful links:
http://www.MySQL.com/
http://www.php.net/
http://www.phpmyadmin.net/
And for Mac OS X users. . .
http://www.entropy.ch/software/macosx/php/
http://aaronfaby.com/php4.php
http://aaronfaby.com/apache2.php
Re: SQL access without Dataminer [message #34044 is a reply to message #33927] Thu, 13 February 2003 02:42 Go to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Jonathan Greenberg wrote:
> Does anyone know if IDL has any SQL access capability without purchasing
> Dataminer? Are there any freeware SQL interface libraries for IDL?
>
> --j
>

In prinziple I am using at the moment something like this.


line=''
READ,line
txt=['use DATABASE ;',line]
del_file,'data.sql'
put_file,'data.sql',txt


SPAWN,'mysql -h 127.0.0.1 -u data -P3306 < data.sql',result


This is more a question to Randall.

Is it possible to write a dlm using mysql as it is now with parameter
submission I did by spawn in this example?


Another nice command is

mysqlshow --host=127.0.0.1 --user=data

SEE ALSO
isamchk (1), isamlog (1), mysqlaccess (1), mysqladmin (1),
mysqlbug (1), mysqld (1), mysqldump (1), mysqlshow (1),
msql2mysql (1), perror (1), replace (1), safe_mysqld (1),
which1 (1), zap (1),

regards

Reimaar


--
Reimar Bauer

Institut fuer Stratosphaerische Chemie (ICG-I)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
------------------------------------------------------------ -------
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg-i/idl_icglib/idl_lib_intro. html
============================================================ =======
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Questions about using CATCH
Next Topic: Re: QROMB and parameters

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:33:54 PDT 2025

Total time taken to generate the page: 0.00694 seconds