[plt-scheme] MySql Library

From: Gordon Weakliem (gweakliem at oddpost.com)
Date: Mon Aug 2 00:29:55 EDT 2004

-D defines a symbol for the C preprocessor, I added that because I was getting a compile error (missing some header, maybe winsock.h?) and noticed in the code that header wasn't included unless __LCC__ was defined.  I don't know why that is, I just needed it defined to get it to compile.  
  
I didn't mention this, but obviously in the command line I gave, you'll need to change the paths to match your environment.  If checking those paths doesn't help, you can send me the compiler output in an email (off-list is probably best) and I'll see if any of the errors look familiar.  It took a fair amount of experimentation to make it compile in the end. 
  
Schematics (http://schematics.sf.net) has a mysql library as well, though you have to get it from CVS.  It uses SWIG to create an interface to the MySQL C libraries; it's very low level like David Van Horn's.  I've been talking to a few others on the Schematics project about creating a .plt distro, but it's a matter of making time and figuring out the PLT packaging system.  
  
It would be interesting to compare performance; bear in mind that on Windows, ODBC is about the least efficient available option for connecting to a database.  Of course, all that gets thrown out when you introduce connection pooling, all things considered, a pooled DB client will probably beat out any non-pooled one.  You'd be amazed at how much time is spent establishing connections when using a database. 
  
-- 
Gordon Weakliem 
http://www.eighty-twenty.net 
  
  
-----Original Message from Bruce Collins <bcollins at austarnet.com.au>-----
  
For list-related administrative tasks: 
  http://list.cs.brown.edu/mailman/listinfo/plt-scheme 

Many thanks for the myslqclient compile 
example for Windows. However a successful compile still 
eludes. Could you tell me what "-D__LCC__" does? 

Since my first post I have looked for other 
efforts to interface mzscheme and mysql. The 
following were all the I could uncover: 

1 SchemeQL 
    Francisco Solsona, Noel Welsh & ..? 
    Uses SrPersist and MyODBC 
    Some documentation and examples available. 

  2 Mysqlclient 
    David Van Horn 2003 
    A Scheme module that interfaces with mysqlclient.lib 
    Uses and extends the PLT FFI 

  3 DB.SS 
    Noel Welsh  2002-2003 
    A Scheme module 
    Uses mysql.ss by Mike MacHenry 

  4 MyS.c 
    Elisa Manara  2003 
    A MzScheme extension with only a few basic functions 

Of the above I have installed and tested SchemeQL 
successfully on a MySql DB. It is an interesting approach that blends 
SQL into Scheme to create what seems, so far, an effective and 
intuitive interface. 
When I finally get Mysqlclient compiled it will be 
interesting to compare its performance with SchemeQL's. 


Posted on the users mailing list.