Newbie: Pointers for Ruby compatible DBase engine

Hi,

Can anyone suggest/direct me to a dbase engine which are supported by
ruby? I'm thinking about a small scale dbase (5,000-10,000 entries)
engine/server, single processed, can be searched on various rules (SQL
compatible would be nice), and most of all, lightweight (have mercy to
my ol' P100Mhz), small size (like Ruby), and free (yeah, I'm cheap). I
know it's a lot to ask. How is mSQL fare?

I have tried mySQL, but it put a lot of strain to my PC (read:
P100MHz) for daily use, and I don't use much of it's power. Also, it's
size is not so small either.

The standard *dbm supported by the STL can only be searched on a
single key, at least that I know of, or are there any ways to overcome
this limitation?

Plz help

TIA

SQLite

Ruby supports it well. It is lightweight, fast, and you query using SQL.
Try it. You'll like it! :slight_smile:

Kirk Haines

···

On Thu, 15 Jul 2004 05:02:20 +0900, Xeon wrote

Hi,

Can anyone suggest/direct me to a dbase engine which are supported by
ruby? I'm thinking about a small scale dbase (5,000-10,000 entries)
engine/server, single processed, can be searched on various rules
(SQL compatible would be nice), and most of all, lightweight (have
mercy to my ol' P100Mhz), small size (like Ruby), and free (yeah,
I'm cheap). I know it's a lot to ask. How is mSQL fare?

Hi Xeon,

Can anyone suggest/direct me to a dbase engine which
are supported by
ruby? I'm thinking about a small scale dbase
(5,000-10,000 entries)
engine/server, single processed, can be searched on
various rules (SQL
compatible would be nice), and most of all,
lightweight (have mercy to
my ol' P100Mhz), small size (like Ruby), and free
(yeah, I'm cheap). I
know it's a lot to ask. How is mSQL fare?

What is the OS on this box ? Like it is already
mentioned SQLite is your best bet. It is very actively
maintained.

There is a Ruby API for mSQL:

http://dontstopmusic.no-ip.org/ruby/archive/ruby-msql-0.2.4a.tar.gz

You may also want to look at KirbyBase.

http://raa.ruby-lang.org/project/kirbybase/

Disclaimer: ** I have never tired either **

HTH,
-- shanko

···

--- Xeon <xdblade@zworg.com> wrote:

__________________________________
Do you Yahoo!?
Take Yahoo! Mail with you! Get it on your mobile phone.
http://mobile.yahoo.com/maildemo

sqlite is good if you need sql - but do you? if not try pstore (it comes with
ruby) or madeline (raa). object storage is just fine about 80% of the time.

   ~ > cat a.rb
   require 'pstore'
   db = PStore.new 'db'

   time = nil
   now = Time.now

   db.transaction do
     time =
       if db.root? 'time'
         db['time']
       else
         now
       end

     db['time'] = Time.now
   end

   p time

   ~ > ruby a.rb && sleep 2 && ruby a.rb && sleep 2 && ruby a.rb
   Wed Jul 14 14:53:53 MDT 2004
   Wed Jul 14 14:53:58 MDT 2004
   Wed Jul 14 14:54:00 MDT 2004

i have pstores with 100000 entries and they are just fine.

-a

···

On Wed, 14 Jul 2004, Xeon wrote:

Hi,

Can anyone suggest/direct me to a dbase engine which are supported by
ruby? I'm thinking about a small scale dbase (5,000-10,000 entries)
engine/server, single processed, can be searched on various rules (SQL
compatible would be nice), and most of all, lightweight (have mercy to
my ol' P100Mhz), small size (like Ruby), and free (yeah, I'm cheap). I
know it's a lot to ask. How is mSQL fare?

I have tried mySQL, but it put a lot of strain to my PC (read:
P100MHz) for daily use, and I don't use much of it's power. Also, it's
size is not so small either.

The standard *dbm supported by the STL can only be searched on a
single key, at least that I know of, or are there any ways to overcome
this limitation?

Plz help

TIA

--

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it;
and a weed grows, even though we do not love it. --Dogen

===============================================================================

Xeon wrote:

Hi,

Can anyone suggest/direct me to a dbase engine which are supported by
ruby? I'm thinking about a small scale dbase (5,000-10,000 entries)
engine/server, single processed, can be searched on various rules (SQL
compatible would be nice), and most of all, lightweight (have mercy to
my ol' P100Mhz), small size (like Ruby), and free (yeah, I'm cheap). I
know it's a lot to ask. How is mSQL fare?

I have tried mySQL, but it put a lot of strain to my PC (read:
P100MHz) for daily use, and I don't use much of it's power. Also, it's
size is not so small either.

The standard *dbm supported by the STL can only be searched on a
single key, at least that I know of, or are there any ways to overcome
this limitation?

Plz help

TIA

Try these engines:

http://www.sqlite.org

Xeon wrote:

Hi,

Can anyone suggest/direct me to a dbase engine which are supported by
ruby? I'm thinking about a small scale dbase (5,000-10,000 entries)
engine/server, single processed, can be searched on various rules (SQL
compatible would be nice), and most of all, lightweight (have mercy to
my ol' P100Mhz), small size (like Ruby), and free (yeah, I'm cheap). I
know it's a lot to ask. How is mSQL fare?

Attention: Shameless Plug Alert!!!

Check out KirbyBase at http://www.netpromi.com/kirbybase.html

It's a 40kb pure-Ruby DBMS library. You can do select statements, similar to SQL, but using native Ruby syntax. It comes with a multi-threaded/multi-user db engine script.

Since I wrote it, I'm pretty biased, but I think it works pretty well. :slight_smile:

Jamey Cribbs

Confidentiality Notice: This email message, including any attachments, is for the sole use of the intended recipient(s) and may contain confidential and/or privileged information. If you are not the intended recipient(s), you are hereby notified that any dissemination, unauthorized review, use, disclosure or distribution of this email and any materials contained in any attachments is prohibited. If you receive this message in error, or are not the intended recipient(s), please immediately notify the sender by email and destroy all copies of the original message, including attachments.

Hi,

Thank's for the tips. I'm now trying both mSQL and SQLite, but I must
say that I like SQLite more.

FYI I'm using a Win98se box, with consideration in using some flavor
of *NIX (I'm considering BeOS or FreeBSD, but certainly not Linux:)
when I upgrade my machine (if ever:)

Now, how can I access SQLite from Ruby? What dll do I need (the TCL
binded or no TCL binding)? If you see my other post, I have
difficulties regarding irb, erb, and rdoc, so in the meantime I'm
using only the pragmatic's programmers book as a guide to STL and
built-in objects, which leaves a lot to document.

BTW, thx for mentioning the pstore approach. I have no way of knowing
otherwise. I'll look it up ASAP.

TIA

Hi,

Thank's for the tips. I'm now trying both mSQL and SQLite, but I must
say that I like SQLite more.

FYI I'm using a Win98se box, with consideration in using some flavor
of *NIX (I'm considering BeOS or FreeBSD, but certainly not Linux:)
when I upgrade my machine (if ever:)

Now, how can I access SQLite from Ruby? What dll do I need (the TCL
binded or no TCL binding)? If you see my other post, I have
difficulties regarding irb, erb, and rdoc, so in the meantime I'm
using only the pragmatic's programmers book as a guide to STL and
built-in objects, which leaves a lot to document.

BTW, thx for mentioning the pstore approach. I have no way of knowing
otherwise. I'll look it up ASAP.

TIA

Ara.T.Howard wrote:

···

On Wed, 14 Jul 2004, Xeon wrote:

Hi,

Can anyone suggest/direct me to a dbase engine which are supported by
ruby? I'm thinking about a small scale dbase (5,000-10,000 entries)
engine/server, single processed, can be searched on various rules (SQL
compatible would be nice), and most of all, lightweight (have mercy to
my ol' P100Mhz), small size (like Ruby), and free (yeah, I'm cheap). I
know it's a lot to ask. How is mSQL fare?

I have tried mySQL, but it put a lot of strain to my PC (read:
P100MHz) for daily use, and I don't use much of it's power. Also, it's
size is not so small either.

The standard *dbm supported by the STL can only be searched on a
single key, at least that I know of, or are there any ways to overcome
this limitation?

Plz help

TIA

sqlite is good if you need sql - but do you? if not try pstore (it comes with
ruby) or madeline (raa). object storage is just fine about 80% of the time.

  ~ > cat a.rb
  require 'pstore'
  db = PStore.new 'db'

  time = nil
  now = Time.now

  db.transaction do
    time =
      if db.root? 'time'
        db['time']
      else
        now
      end

    db['time'] = Time.now
  end

  p time

  ~ > ruby a.rb && sleep 2 && ruby a.rb && sleep 2 && ruby a.rb
  Wed Jul 14 14:53:53 MDT 2004
  Wed Jul 14 14:53:58 MDT 2004
  Wed Jul 14 14:54:00 MDT 2004

i have pstores with 100000 entries and they are just fine.

-a
--

> EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
> PHONE :: 303.497.6469
> A flower falls, even though we love it;
> and a weed grows, even though we do not love it. | --Dogen

Fascinating stuff! Do you recommend pstore or madeline?

Is this "production-ready" based on your experiences?

Thanks for the tip.

Ara.T.Howard wrote:

···

On Wed, 14 Jul 2004, Xeon wrote:

Hi,

Can anyone suggest/direct me to a dbase engine which are supported by
ruby? I'm thinking about a small scale dbase (5,000-10,000 entries)
engine/server, single processed, can be searched on various rules (SQL
compatible would be nice), and most of all, lightweight (have mercy to
my ol' P100Mhz), small size (like Ruby), and free (yeah, I'm cheap). I
know it's a lot to ask. How is mSQL fare?

I have tried mySQL, but it put a lot of strain to my PC (read:
P100MHz) for daily use, and I don't use much of it's power. Also, it's
size is not so small either.

The standard *dbm supported by the STL can only be searched on a
single key, at least that I know of, or are there any ways to overcome
this limitation?

Plz help

TIA

sqlite is good if you need sql - but do you? if not try pstore (it comes with
ruby) or madeline (raa). object storage is just fine about 80% of the time.

  ~ > cat a.rb
  require 'pstore'
  db = PStore.new 'db'

  time = nil
  now = Time.now

  db.transaction do
    time =
      if db.root? 'time'
        db['time']
      else
        now
      end

    db['time'] = Time.now
  end

  p time

  ~ > ruby a.rb && sleep 2 && ruby a.rb && sleep 2 && ruby a.rb
  Wed Jul 14 14:53:53 MDT 2004
  Wed Jul 14 14:53:58 MDT 2004
  Wed Jul 14 14:54:00 MDT 2004

i have pstores with 100000 entries and they are just fine.

-a
--

> EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
> PHONE :: 303.497.6469
> A flower falls, even though we love it;
> and a weed grows, even though we do not love it. | --Dogen

Also, YAML.

Looks nice :slight_smile: Any benchmarks? (And why no hash input to 'select'?)

martin

···

Jamey Cribbs <cribbsj@oakwood.org> wrote:

Check out KirbyBase at http://www.netpromi.com/kirbybase.html

It's a 40kb pure-Ruby DBMS library. You can do select statements,
similar to SQL, but using native Ruby syntax. It comes with a
multi-threaded/multi-user db engine script.

Since I wrote it, I'm pretty biased, but I think it works pretty well. :slight_smile:

Hi,

Thank's for the tips. I'm now trying both mSQL and SQLite, but I must
say that I like SQLite more.

me too.

FYI I'm using a Win98se box, with consideration in using some flavor of *NIX
(I'm considering BeOS or FreeBSD, but certainly not Linux:) when I upgrade
my machine (if ever:)

Now, how can I access SQLite from Ruby? What dll do I need (the TCL binded
or no TCL binding)? If you see my other post, I have difficulties regarding
irb, erb, and rdoc, so in the meantime I'm using only the pragmatic's
programmers book as a guide to STL and
built-in objects, which leaves a lot to document.

BTW, thx for mentioning the pstore approach. I have no way of knowing
otherwise. I'll look it up ASAP.

TIA

jamis buck's sqlite module:

http://sqlite-ruby.rubyforge.org/

-a

···

On Thu, 15 Jul 2004, Xeon wrote:
--

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it;
and a weed grows, even though we do not love it. --Dogen

===============================================================================

Fascinating stuff! Do you recommend pstore or madeline?

pstore is so dang simple - must be 300 lines of code - and i like the
simplicity. madeline is more fully featured and should perform better though,
it sounds like that will not matter in your case since both are plenty fast
for smallish data sets. development is quicker with pstore since you don't
have to write command objects, but not terribly so.

Is this "production-ready" based on your experiences?

define 'production'. i've used in code for two or three years without
problems, like i said, it's so simply there is not much to go wrong. it's
been behind cgi programs, scripts, and part of an offline mass-storage
inventory system and functioned flawlessly.

Thanks for the tip.

no problem. sqlite IS great if you want sql and i would reccomend that. on
the otherhand i've had more problems with it that pstore: 2 or 3 as compared
to zero.

cheers.

-a

···

On Wed, 14 Jul 2004, Randy Lawrence wrote:
--

EMAIL :: Ara [dot] T [dot] Howard [at] noaa [dot] gov
PHONE :: 303.497.6469
A flower falls, even though we love it;
and a weed grows, even though we do not love it. --Dogen

===============================================================================