From: Slobodan Blazeski
Subject: Database bindings development ?
Date: 
Message-ID: <1185888635.598768.263680@57g2000hsv.googlegroups.com>
I just started a new app which needs data warehousing capable RDMBS
backend, so I went for MonetDB http://monetdb.cwi.nl/. Hooking lisp
through odbc works fine but it seemed that odbc is malfunctioning on a
lot of machines , mostly because of corrupted registries or
malfunctioning MDAC, also the instalation process would be more
cumbersome.  So I'm asking myself  how much would it take to create
production quality bindings for monetdb? And does it worth it?  If
anybody has some experience with creating database bindings I would be
glad to hear it.
thanks

From: Daniel Albuschat
Subject: Re: Database bindings development ?
Date: 
Message-ID: <f8o67l$l2k$01$1@news.t-online.com>
Slobodan Blazeski schrieb:
> I just started a new app which needs data warehousing capable RDMBS
> backend, so I went for MonetDB http://monetdb.cwi.nl/. Hooking lisp
> through odbc works fine but it seemed that odbc is malfunctioning on a
> lot of machines , mostly because of corrupted registries or
> malfunctioning MDAC, also the instalation process would be more
> cumbersome.  So I'm asking myself  how much would it take to create
> production quality bindings for monetdb? And does it worth it?  If
> anybody has some experience with creating database bindings I would be
> glad to hear it.

Hello Slobodan,

I've recently "finished" (that is, it's 90% complete and currently on
hold, till in a few weeks or so) a binding to the Firebird database.
It already works rather well. Firebird is a fork from Interbase,
which is developed Borland aka Inprise. Borland stopped releasing
Interbase as open-source, so the community took over, founded the
Firebird project and continued work on the codebase. That's been like
five years or so, iirc.
Firebird a very good database and we're using it for years now. It's
simple to set up, stable, has stored procedures, triggers, foreign keys,
generators (similar to sequences) and even more neat features in the
recently released version 2.0.
The binding works on Interbase, too, since the network-protocol did
not change. I'm not all that certain about the newer, commercial
releases of Interbase, though.

You can find my bindings (consisting of a C-library (that's actually
written in C++, but exports C symbols) and the Lisp cffi-code with
a small beatifie-layer) at
http://code.google.com/p/fbsql/

Disclaimer: This was actually my first Lisp-project (I'm still in the
learning process) and it's hacked together in a matter of days. It's
rather clean, in my opinion, but there might be things that an
experience Lisp-programmer might consider stupid. Anybody feel free
about contacting me with any kind of issues with the code.
There'll be a major cleanup in the future, and I'll eventually release
a version 1.0 then.

Regards,
    Daniel Albuschat
From: Ken Tilton
Subject: Re: Database bindings development ?
Date: 
Message-ID: <9%Pri.123$2d7.52@newsfe12.lga>
Daniel Albuschat wrote:
> Slobodan Blazeski schrieb:
> 
>> I just started a new app which needs data warehousing capable RDMBS
>> backend, so I went for MonetDB http://monetdb.cwi.nl/. Hooking lisp
>> through odbc works fine but it seemed that odbc is malfunctioning on a
>> lot of machines , mostly because of corrupted registries or
>> malfunctioning MDAC, also the instalation process would be more
>> cumbersome.  So I'm asking myself  how much would it take to create
>> production quality bindings for monetdb? And does it worth it?  If
>> anybody has some experience with creating database bindings I would be
>> glad to hear it.
> 
> 
> Hello Slobodan,
> 
> I've recently "finished" (that is, it's 90% complete and currently on
> hold, till in a few weeks or so) a binding to the Firebird database.
> It already works rather well. Firebird is a fork from Interbase,
> which is developed Borland aka Inprise. Borland stopped releasing
> Interbase as open-source, so the community took over, founded the
> Firebird project and continued work on the codebase. That's been like
> five years or so, iirc.
> Firebird a very good database and we're using it for years now. It's
> simple to set up, stable, has stored procedures, triggers, foreign keys,
> generators (similar to sequences) and even more neat features in the
> recently released version 2.0.
> The binding works on Interbase, too, since the network-protocol did
> not change. I'm not all that certain about the newer, commercial
> releases of Interbase, though.
> 
> You can find my bindings (consisting of a C-library (that's actually
> written in C++, but exports C symbols) and the Lisp cffi-code with
> a small beatifie-layer) at
> http://code.google.com/p/fbsql/
> 
> Disclaimer: This was actually my first Lisp-project (I'm still in the
> learning process) and it's hacked together in a matter of days. It's
> rather clean, in my opinion, but there might be things that an
> experience Lisp-programmer might consider stupid. Anybody feel free
> about contacting me with any kind of issues with the code.

I'll give you a damn issue. Lisp programmers do not produce libraries, 
never mind useful ones. Hell, most Lisp programmers do not even program 
in Lisp, they just come here to use up the oxygen. The only people 
actually programming in Lisp are fools like you who do not know a dead 
whale when they find one on the beach and try to teach it to balance a 
beach ball on its nose, and those fools do not produce libraries, they 
just come here to whine about other people not producing libraries.

OK, I get it, you are going for double-fool status, aka The Lisp Open 
Source Fairy. Fine, best of luck.

kenny

-- 
http://www.theoryyalgebra.com/

"Algebra is the metaphysics of arithmetic." - John Ray

"As long as algebra is taught in school,
there will be prayer in school." - Cokie Roberts

"Stand firm in your refusal to remain conscious during algebra."
    - Fran Lebowitz

"I'm an algebra liar. I figure two good lies make a positive."
    - Tim Allen
From: Slobodan Blazeski
Subject: Re: Database bindings development ?
Date: 
Message-ID: <1185952106.859690.242550@q75g2000hsh.googlegroups.com>
On Jul 31, 10:31 pm, Daniel Albuschat <······@happy.viming.de> wrote:
> Slobodan Blazeski schrieb:
>
> > I just started a new app which needs data warehousing capable RDMBS
> > backend, so I went for MonetDBhttp://monetdb.cwi.nl/. Hooking lisp
> > through odbc works fine but it seemed that odbc is malfunctioning on a
> > lot of machines , mostly because of corrupted registries or
> > malfunctioning MDAC, also the instalation process would be more
> > cumbersome.  So I'm asking myself  how much would it take to create
> > production quality bindings for monetdb? And does it worth it?  If
> > anybody has some experience with creating database bindings I would be
> > glad to hear it.
>
> Hello Slobodan,
>
> I've recently "finished" (that is, it's 90% complete and currently on
> hold, till in a few weeks or so) a binding to the Firebird database.
> It already works rather well. Firebird is a fork from Interbase,
> which is developed Borland aka Inprise. Borland stopped releasing
> Interbase as open-source, so the community took over, founded the
> Firebird project and continued work on the codebase. That's been like
> five years or so, iirc.
> Firebird a very good database and we're using it for years now. It's
> simple to set up, stable, has stored procedures, triggers, foreign keys,
> generators (similar to sequences) and even more neat features in the
> recently released version 2.0.
> The binding works on Interbase, too, since the network-protocol did
> not change. I'm not all that certain about the newer, commercial
> releases of Interbase, though.
>
> You can find my bindings (consisting of a C-library (that's actually
> written in C++, but exports C symbols) and the Lisp cffi-code with
> a small beatifie-layer) athttp://code.google.com/p/fbsql/
>
> Disclaimer: This was actually my first Lisp-project (I'm still in the
> learning process) and it's hacked together in a matter of days. It's
> rather clean, in my opinion, but there might be things that an
> experience Lisp-programmer might consider stupid. Anybody feel free
> about contacting me with any kind of issues with the code.
> There'll be a major cleanup in the future, and I'll eventually release
> a version 1.0 then.
>
> Regards,
>     Daniel Albuschat

Congratulation for your succesfull project Daniel, but I'm interested
in data warehousing DBMS,a column oriented one,
http://en.wikipedia.org/wiki/Column-oriented_DBMS, those are  for
query intensive operations working on millions of rows.
Beside I'm interested in the process of developing the bindings, how
long does it took, any problems you encountered and wanna share your
experience etc.


Slobodan
From: Daniel Albuschat
Subject: Re: Database bindings development ?
Date: 
Message-ID: <f8pg5a$pep$02$1@news.t-online.com>
Slobodan Blazeski wrote:
> On Jul 31, 10:31 pm, Daniel Albuschat <······@happy.viming.de> wrote:
>> Slobodan Blazeski schrieb:
>>
>>> I just started a new app which needs data warehousing capable RDMBS
>>> backend, so I went for MonetDBhttp://monetdb.cwi.nl/. Hooking lisp
>>> through odbc works fine but it seemed that odbc is malfunctioning on a
>>> lot of machines , mostly because of corrupted registries or
>>> malfunctioning MDAC, also the instalation process would be more
>>> cumbersome.  So I'm asking myself  how much would it take to create
>>> production quality bindings for monetdb? And does it worth it?  If
>>> anybody has some experience with creating database bindings I would be
>>> glad to hear it.
>> Hello Slobodan,

[fbsql]

> Congratulation for your succesfull project Daniel, but I'm interested
> in data warehousing DBMS,a column oriented one,
> http://en.wikipedia.org/wiki/Column-oriented_DBMS, those are  for
> query intensive operations working on millions of rows.

I see. I have no experience with column-oriented DBs, though.

> Beside I'm interested in the process of developing the bindings, how
> long does it took, any problems you encountered and wanna share your
> experience etc.

It was pretty straightforward. I have created several layers to make
coding easier and faster. After all, when working with databases, a few
function-indirections before the real SQL gets loaded and fetched, are
of no great interest. Premature optimization all all that.
First, I used IBPP, which is a very easy C++-interface to firebird, and
wrapped it into C functions. Then I used those  C-functions from within
Lisp via CFFI and created a small beautifier to make it easier to use
with native Lisp-types.
All in all it took about a week of my freetime. I have translated 167
C-functions, and I bet you can do it far more effective than me, being
a Lisp-beginner (as in, have less redundancy than I have).

It actually all depends on the complexity of the database's API. If I
used the raw Firebird/Interbase-API, it would've taken much longer,
because it is very arcane and I imagine it'd get quite complicated to
do all the bit-level munching in Lisp.

I've had a quick look at MonetDB's API, called "mapi". Here's an
example:
http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/An-Example.html#An-Example
The API looks quite "modern" and should be very easy to use with CFFI.


Regards,

Daniel Albuschat
From: Slobodan Blazeski
Subject: Re: Database bindings development ?
Date: 
Message-ID: <1185965883.602872.164950@d55g2000hsg.googlegroups.com>
On Aug 1, 10:27 am, Daniel Albuschat <······@happy.viming.de> wrote:
> Slobodan Blazeski wrote:
> > On Jul 31, 10:31 pm, Daniel Albuschat <······@happy.viming.de> wrote:
> >> Slobodan Blazeski schrieb:
>
> >>> I just started a new app which needs data warehousing capable RDMBS
> >>> backend, so I went for MonetDBhttp://monetdb.cwi.nl/. Hooking lisp
> >>> through odbc works fine but it seemed that odbc is malfunctioning on a
> >>> lot of machines , mostly because of corrupted registries or
> >>> malfunctioning MDAC, also the instalation process would be more
> >>> cumbersome.  So I'm asking myself  how much would it take to create
> >>> production quality bindings for monetdb? And does it worth it?  If
> >>> anybody has some experience with creating database bindings I would be
> >>> glad to hear it.
> >> Hello Slobodan,
>
> [fbsql]
>
> > Congratulation for your succesfull project Daniel, but I'm interested
> > in data warehousing DBMS,a column oriented one,
> >http://en.wikipedia.org/wiki/Column-oriented_DBMS, those are  for
> > query intensive operations working on millions of rows.
>
> I see. I have no experience with column-oriented DBs, though.
>
> > Beside I'm interested in the process of developing the bindings, how
> > long does it took, any problems you encountered and wanna share your
> > experience etc.
>
> It was pretty straightforward. I have created several layers to make
> coding easier and faster. After all, when working with databases, a few
> function-indirections before the real SQL gets loaded and fetched, are
> of no great interest. Premature optimization all all that.
> First, I used IBPP, which is a very easy C++-interface to firebird, and
> wrapped it into C functions. Then I used those  C-functions from within
> Lisp via CFFI and created a small beautifier to make it easier to use
> with native Lisp-types.
> All in all it took about a week of my freetime. I have translated 167
> C-functions, and I bet you can do it far more effective than me, being
> a Lisp-beginner (as in, have less redundancy than I have).
>
> It actually all depends on the complexity of the database's API. If I
> used the raw Firebird/Interbase-API, it would've taken much longer,
> because it is very arcane and I imagine it'd get quite complicated to
> do all the bit-level munching in Lisp.
>
> I've had a quick look at MonetDB's API, called "mapi". Here's an
> example:http://monetdb.cwi.nl/projects/monetdb/SQL/Documentation/An-Example.h...
> The API looks quite "modern" and should be very easy to use with CFFI.
>
> Regards,
>
> Daniel Albuschat

Thanks Daniel.
From: Sacha
Subject: Re: Database bindings development ?
Date: 
Message-ID: <5dQri.27258$h5.1192235@phobos.telenet-ops.be>
Daniel Albuschat wrote:
> Slobodan Blazeski schrieb:
>> I just started a new app which needs data warehousing capable RDMBS
>> backend, so I went for MonetDB http://monetdb.cwi.nl/. Hooking lisp
>> through odbc works fine but it seemed that odbc is malfunctioning on a
>> lot of machines , mostly because of corrupted registries or
>> malfunctioning MDAC, also the instalation process would be more
>> cumbersome.  So I'm asking myself  how much would it take to create
>> production quality bindings for monetdb? And does it worth it?  If
>> anybody has some experience with creating database bindings I would be
>> glad to hear it.
> 
> Hello Slobodan,
> 
> I've recently "finished" (that is, it's 90% complete and currently on
> hold, till in a few weeks or so) a binding to the Firebird database.
> It already works rather well. Firebird is a fork from Interbase,
> which is developed Borland aka Inprise. Borland stopped releasing
> Interbase as open-source, so the community took over, founded the
> Firebird project and continued work on the codebase. That's been like
> five years or so, iirc.
> Firebird a very good database and we're using it for years now. It's
> simple to set up, stable, has stored procedures, triggers, foreign keys,
> generators (similar to sequences) and even more neat features in the
> recently released version 2.0.
> The binding works on Interbase, too, since the network-protocol did
> not change. I'm not all that certain about the newer, commercial
> releases of Interbase, though.
> 
> You can find my bindings (consisting of a C-library (that's actually
> written in C++, but exports C symbols) and the Lisp cffi-code with
> a small beatifie-layer) at
> http://code.google.com/p/fbsql/
> 
> Disclaimer: This was actually my first Lisp-project (I'm still in the
> learning process) and it's hacked together in a matter of days. It's
> rather clean, in my opinion, but there might be things that an
> experience Lisp-programmer might consider stupid. Anybody feel free
> about contacting me with any kind of issues with the code.
> There'll be a major cleanup in the future, and I'll eventually release
> a version 1.0 then.
> 
> Regards,
>    Daniel Albuschat

Cool! I have to check this. Firebird is a very nice SQL server.
Does it work for standalone FB as well ?

Sacha
From: Sacha
Subject: Re: Database bindings development ?
Date: 
Message-ID: <0eQri.27260$Ku.1198128@phobos.telenet-ops.be>
Sacha wrote:
> Daniel Albuschat wrote:
>> Slobodan Blazeski schrieb:
>>> I just started a new app which needs data warehousing capable RDMBS
>>> backend, so I went for MonetDB http://monetdb.cwi.nl/. Hooking lisp
>>> through odbc works fine but it seemed that odbc is malfunctioning on a
>>> lot of machines , mostly because of corrupted registries or
>>> malfunctioning MDAC, also the instalation process would be more
>>> cumbersome.  So I'm asking myself  how much would it take to create
>>> production quality bindings for monetdb? And does it worth it?  If
>>> anybody has some experience with creating database bindings I would be
>>> glad to hear it.
>>
>> Hello Slobodan,
>>
>> I've recently "finished" (that is, it's 90% complete and currently on
>> hold, till in a few weeks or so) a binding to the Firebird database.
>> It already works rather well. Firebird is a fork from Interbase,
>> which is developed Borland aka Inprise. Borland stopped releasing
>> Interbase as open-source, so the community took over, founded the
>> Firebird project and continued work on the codebase. That's been like
>> five years or so, iirc.
>> Firebird a very good database and we're using it for years now. It's
>> simple to set up, stable, has stored procedures, triggers, foreign keys,
>> generators (similar to sequences) and even more neat features in the
>> recently released version 2.0.
>> The binding works on Interbase, too, since the network-protocol did
>> not change. I'm not all that certain about the newer, commercial
>> releases of Interbase, though.
>>
>> You can find my bindings (consisting of a C-library (that's actually
>> written in C++, but exports C symbols) and the Lisp cffi-code with
>> a small beatifie-layer) at
>> http://code.google.com/p/fbsql/
>>
>> Disclaimer: This was actually my first Lisp-project (I'm still in the
>> learning process) and it's hacked together in a matter of days. It's
>> rather clean, in my opinion, but there might be things that an
>> experience Lisp-programmer might consider stupid. Anybody feel free
>> about contacting me with any kind of issues with the code.
>> There'll be a major cleanup in the future, and I'll eventually release
>> a version 1.0 then.
>>
>> Regards,
>>    Daniel Albuschat
> 
> Cool! I have to check this. Firebird is a very nice SQL server.
> Does it work for standalone FB as well ?
> 
> Sacha

I mean embedded firebird.
From: Daniel Albuschat
Subject: Re: Database bindings development ?
Date: 
Message-ID: <f8pcdr$h1n$03$1@news.t-online.com>
Sacha wrote:
> Sacha wrote:
>> Daniel Albuschat wrote:

[fbsql, Lisp-binding for Firebird-SQL]

>> Cool! I have to check this. Firebird is a very nice SQL server.
>> Does it work for standalone FB as well ?
>>
> I mean embedded firebird.

Since embedded Firebird is virtually transparent to Applications, this
works as long as the correct DLL is loaded. In the next major IBPP
version (remember: I've basically written a C-binding for IBPP, that I
in turn then used for Lisp) there'll be a "Driver"-interface that'll
handling DLLs/SOs even easier. But it should already work as long as
you have the embedded fbclient.dll loaded by your application.

Regards,
    Daniel Albuschat
From: Robert Uhl
Subject: Re: Database bindings development ?
Date: 
Message-ID: <m3sl73ry9g.fsf@latakia.dyndns.org>
Daniel Albuschat <······@happy.viming.de> writes:
>
> You can find my bindings (consisting of a C-library (that's actually
> written in C++, but exports C symbols) and the Lisp cffi-code with
> a small beatifie-layer) at
> http://code.google.com/p/fbsql/

You may wish to consider seeing if this can be grafted into the CLSQL
project; I'm sure they'd love to add another supported database to their
list.  I don't know how much work it'd be for you, though.

-- 
Robert Uhl <http://public.xdi.org/=ruhl>
If you contact me with your Windows problems, sure I'll write you out a
trouble-ticket.  It'll be the IT equivalent of your doctor writing out a
'Please refer this patient to Dr. Harold Shipman' letter.       --Tanuki
From: Daniel Albuschat
Subject: Re: Database bindings development ?
Date: 
Message-ID: <f8shgt$sgl$02$1@news.t-online.com>
Robert Uhl wrote:
> Daniel Albuschat <······@happy.viming.de> writes:
>> You can find my bindings (consisting of a C-library (that's actually
>> written in C++, but exports C symbols) and the Lisp cffi-code with
>> a small beatifie-layer) at
>> http://code.google.com/p/fbsql/
> 
> You may wish to consider seeing if this can be grafted into the CLSQL
> project; I'm sure they'd love to add another supported database to their
> list.  I don't know how much work it'd be for you, though.

Yes, that's already on my To-do. I don't know how CL-SQL looks like, up
till now I only recognized it's existence, but didn't find the time to
look into it.

Thanks for the feedback.