From: Anders Borch Date: 2003-05-30T05:43:12+09:00 Subject: Re: Metakit for Ruby - Would you want it? Brian Candler wrote: > On Fri, May 30, 2003 at 04:02:07AM +0900, Anders Borch wrote: > >>what I would like is an embedded sql database. It seems to me that >>metakit does not have an sql parser. having an sql parser would let me >>make a dbi interface and use an embedded database w/o changing a single >>line of code. > > > You mean like sqlite? http://www.sqlite.com/ yeah! exactly like sqlite! you just saved my day :) > There are ruby bindings which work more or less (get the latest ruby-dbi-all > from CVS) and it even has a DBI interface! this is *so* cool! :D > However, IMO, SQL makes for a dreadful API. I have been writing some code > which I try to run with sqlite (for Unit testing), mysql (for a staging > area) and Oracle (for live production). It's been a complete nightmare. It's > all just so non-standardised when it gets down to the nitty gritty. sadly sql isn't standardized at all (in practice), but that does not change the fact that everyone and their mothers speak some subset of sql. Therefore if anyone but me is going to maintain and develop for systems that I made, then I need to use stuff they know - like sql in stead of some odd db interface... also half of the time i'm building software using ruby and storing data in some sql database and someone else is writing some other software in java that works with the same data. If I am to work together with other people across languages it's often better to have a common ground that is an sql database. > If you just want objects which persist, and your database isn't so enormous, > you might like to take a completely different approach (e.g. madeleine) yeah, I have been looking at a some of those solutions... db-backend was the one I was most impressed with. It was also the one most likely to fulfill my needs. I would like to have a nice database backend stucture (as made possible in db-backend) combined with ease of use (as in some of the non-sql variants out there). db-backend makes it possible to have a nice database structure but the price is that I need to define the database to ruby object mappings. madeleine (and the like - i looked at a couple of those) lets me easily have persistent objects but I cannot easily interact with the java people whom I would like to share my objects with. So, in the spirit of so many other open source developers, I did not expand upon existing code, but in stead I started my own project. I aim to have easily persisten objects and at the same time have an easily manageable database structure. The project is awailable at http://rsqlserial.sf.net (and at RAA - search for sql and it should be among the top 10 hits). I ended up rather off-topic and with a not very subtle plug for my own (still alpha) project. But hey - I got my sqlite now! In an effort to get back on topic: more embedded databases can only benefit us all. And for those who - like Brian - do not like sql, metakit looks very nice indeed. From what I read of the API it seems very nice and sleek. Go ahead and make a ruby binding for it :) > Regards, > > Brian. > /Anders