Subj : Re: Database program to just work with text files? To : comp.os.linux From : adams_forum Date : Thu Sep 09 2004 03:52 pm Average_Joe wrote in message news:... > In article <6f1027e6.0408210953.2bab0d89@posting.google.com>, Adam wrote: > > Hello, > > > > Does anyone know if there exists a database program for Linux that > > just modifies one or more text files? > > bash/cut/awk/sed/grep ? :-) > > Seriously, have a look at: > > http://www.cse.ucsc.edu/research/compbio/rdb/ > > The idea is to use UNIX pipes and tab files in a RDB. I used it many > years ago and liked it because of it's simplicity. > > It's not SQL, it's a totally different way of handling data, that may be > a plus or a minus to you. (I kind of liked it) > > I've done many similiar things myself in perl for application specific > data. Thanks, it looks like a good program, but I'd kind of like to stick with SQL (I have a bunch of SQL statements written already plus I'm used to it). I especially liked that program's claim that there are no arbitrary limits, if in fact the claim is true. Limits in programs that don't need to have them have always annoyed me. > > I've been using mysql, but I don't want something for networks; I > > don't like the daemon that runs in the background (according to top > > and KDE System Guard, it has 4 threads running taking about 25MB > > each!). I just have a personal "database" consisting of tab-separated > > values and I want to query it with SQL statements rather than look > > through the file. > > > > All I want is a program to do the following: > > 1. open 1 or more text files, 1 file per database table > > 2. read the data into memory > > 3. execute an SQL statement on it > > 4. if the statement was a modification, save the data back > > > > Permissions would be handled by the file permissions and owner(s), no > > daemons, no networks, no sockets, just nice and simple. > > Except for the SQL requirement, RDB is nice for what you describe. > > There was once a project that used _nothing_ but shell scripts to > implement an SQL database. Maybe someone will remember it. ('course SQL > via shell is more or less just a way of proving it *can* be done, > doesn't mean it *should* be done :-) ) I don't think it is a good idea to write an SQL database in shell scripts. In my opinion, shell scripts should mainly be used when most of the commands are other programs being run which need input from each other or which need to be run automatically. Anytime there's a lot of processing going on (if statements, loops, etc.), it's time to use a real programming langauge. .