KirbyBase For Ruby
KirbyBase is a simple database management system, written in pure-Ruby, that stores its data in plain-text files.
Download
Manual
Manual in French
(thanks to Alain Feler) KirbyBase Manual
Features
- It runs anywhere that Ruby runs and is easy to distribute, since the entire DBMS is in one (approx. 100k) code file.
- All data is kept in plain-text, delimited files that can be edited by hand. This gives you the ability to make changes by just opening the file up in a text editor.
- It can be used as an embedded database or in a client/server, multi-user mode. To switch from one mode to the other, you simply change one line in your program.
- Tables are kept on disk during use and accessed from disk when selecting, updating, inserting, and deleting records. Changes to a table are written immediately to disk. KirbyBase is not an "in-memory" database. Once you update the database in your program, you can be assured that the change has been saved to disk.
- You can specify the type of data that each field will hold. The available data types are: String, Integer, Float, Boolean, Time, Date, DateTime, Memo, Blob, and YAML.
- The query syntax is very "rubyish". In fact, it is Ruby. Instead of having to use another language like SQL, you express your query using Ruby code blocks.
- All inserted records have an auto-incrementing primary key that is guaranteed to uniquely identify the record throughout its lifetime.
- You can specify that the result set be sorted on multiple fields, each one either ascending or descending.
- You can specify that certain fields be indexed. Using an index in a select query can greatly improve performance on large tables (I've seen 10x speed improvements). Index maintenance is completely handled by KirbyBase.
- You can specify that a field has a "lookup table". Whenever that field is accessed, the corresponding record from the lookup table is automatically available.
- You can specify one-to-many links between tables, somewhat analogous to a "join" in SQL.
- You can create calculated fields that are computed at runtime.
In meeting your DBMS needs, KirbyBase fits in somewhere between plain text files and small SQL database management systems like SQLite and MySQL.
The dog, the myth, the legend
KirbyBase was named after my dog, Kirby, pictured here when he was just a pup.