drlove@well.sf.ca.us (David R. Love) (04/24/91)
Does anyone know of a flat-file handler, i.e. a quasi-database that works with flat ASCII files for simple retrievals and reports, and that is UNIX-based? Thanks in advance for any information. Dave Love
chip@osh3.OSHA.GOV (Chip Yamasaki) (04/24/91)
In <24375@well.sf.ca.us> drlove@well.sf.ca.us (David R. Love) writes: >Does anyone know of a flat-file handler, i.e. a quasi-database that >works with flat ASCII files for simple retrievals and reports, and >that is UNIX-based? Thanks in advance for any information. Dave Love Sounds like it's possible a job for dbm or dbz if the file could get large. I think most *nix's supply a version of dbm and dbz is in, hmmm... let's see, it was either C News or the NN news reader, I can'r remember. If the files are going to be reasonably small Perl (from Larry Wall) might be an option. Not that Perl can handle large files (as Larry says), just that it might be slow if the file was huge. -- -- Charles "Chip" Yamasaki chip@oshcomm.osha.gov -- -- Charles "Chip" Yamasaki chip@oshcomm.osha.gov
mireley@horus.cem.msu.EDU (John Mireley) (04/24/91)
From article <24375@well.sf.ca.us>, by drlove@well.sf.ca.us (David R. Love): > > Does anyone know of a flat-file handler, i.e. a quasi-database that > works with flat ASCII files for simple retrievals and reports, and > that is UNIX-based? Thanks in advance for any information. Dave Love Try awk. It comes standard on every unix system. I use it on a regular basis to manipulate flat files from our administration before loading the data into our DBMS. It is very powerful and can be driven from the command line or from soruce files. The unix utilities cut, paste, grep and pr are also useful utilities for working on flat ascii files. Opps, almost forgot join and sort. Given these one wonders why you would need a dbms. I remeber now, "user friendly". These all lack that particular characteristic. John Mireley
mark@drd.com (Mark Lawrence) (04/24/91)
In article <24375@well.sf.ca.us> drlove@well.sf.ca.us (David R. Love) writes: > >Does anyone know of a flat-file handler, i.e. a quasi-database that >works with flat ASCII files for simple retrievals and reports, and >that is UNIX-based? Thanks in advance for any information. Dave Love common question. /rdb explained in UNIX Relational Database Management by Manis, Schaffer, Jorgensen, Prentice-Hall 1988, ISBN 0-13-938622-x. Available commercially. Jinx/cterm by Hank P. Penning available from: archive.cs.ruu.nl (131.211.80.5) pub/UNIX/jinx.shar.Z or via mail-server@cs.ruu.nl by sending a message containing: begin send cterm.shar send jinx.shar send jinx.ps end the postscript file contains a paper describing jinx. Enjoy -- -- mark@drd.com mark@jnoc.go.jp $B!J%^!<%/!&%i%l%s%9!K(B Nihil novum sub solem
henkp@cs.ruu.nl (Henk P. Penning) (04/25/91)
In <1991Apr24.032545.16979@osh3.OSHA.GOV> chip@osh3.OSHA.GOV (Chip Yamasaki) writes: >In <24375@well.sf.ca.us> drlove@well.sf.ca.us (David R. Love) writes: > >>Does anyone know of a flat-file handler, i.e. a quasi-database that >>works with flat ASCII files for simple retrievals and reports, and >>that is UNIX-based? Thanks in advance for any information. Dave Love > >Sounds like it's possible a job for dbm or dbz if the file could get >large. I think most *nix's supply a version of dbm and dbz is in, >hmmm... let's see, it was either C News or the NN news reader, I can'r >remember. > >If the files are going to be reasonably small Perl (from Larry Wall) >might be an option. Not that Perl can handle large files (as Larry >says), just that it might be slow if the file was huge. If Perl is good enough, you might want to look as Jinx (see below). === HenkP === Henk P. Penning, Dept of Computer Science, Utrecht University. Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Telephone: +31-30-534106 e-mail : henkp@cs.ruu.nl (uucp to hp4nl!ruuinf!henkp) -------------------------------------------------------------- I have put together a system for manipulating simple databases. It is called 'jinx'. I wrote it for the secretaries at our department. Jinx is easy to use but has powerful relational facilities as well. Jinx is an interactive, menu-driven program which handles databases consisting of lists of records, each a list of fields. In a given database, every record contains the same number of fields. In short, a database is structured like the /etc/passwd file. For each field a regexp may be specified which is used as a constraint on the data which may be entered in the field. Users may override this constraint. There is no limit on the number of records in a database, or the number of fields in a record, or the length of a field. A field may contain arbitrary ascii-printable data. Jinx uses curses so it runs on any terminal or window of any size. Jinx doesn't require a 'special' perl, plain PL.18+ will do. With Jinx you can perform operations on a database like: -- update, add, copy and delete records -- test if all fields in all records match their associated regexp -- select/delete a subset of the records by various means -- put back some of the deleted records -- sort the database on one or more key-fields -- project on one or more columns -- join with another database -- add a column to the database (that is: add a field to every record) -- insert some records from another database -- test if some given combination of fields is uniq for all records -- compute fields as a function of other fields in the record A database is represented by two files, both of them ordinary, editable files. A simple report generator is provided. Some of the main functions are available as shell-callable perl scripts. Jinx requires the 'cterm' package I posted earlier. Jinx and cterm are available from our archive server archive.cs.ruu.nl (131.211.80.5). If you have ftp, get 'cterm.shar.Z' and 'jinx.shar.Z' from directory 'pub/UNIX'. If not, send a message to 'mail-server@cs.ruu.nl' containing the next 4 lines: begin send UNIX/cterm.shar send UNIX/jinx.shar end The mail-server will send you the compressed, uuencoded stuff. Jinx+tools+man+doc is about 4500 lines, (compressed 60 KB). A jinx tutorial (in LaTeX) is included in the package. A PostScript version is available in 'UNIX/jinx.ps' in our archive. Please, try out Jinx and let me know what you think. === HenkP === PS. Jinx is distributed under the terms of the Gnu General Public Licence. -- Henk P. Penning, Dept of Computer Science, Utrecht University. Padualaan 14, P.O. Box 80.089, 3508 TB Utrecht, The Netherlands. Telephone: +31-30-534106 e-mail : henkp@cs.ruu.nl (uucp to hp4nl!ruuinf!henkp)
brian@enkil.UUCP (brian) (04/26/91)
In article <24375@well.sf.ca.us>, drlove@well.sf.ca.us (David R. Love) writes: > > Does anyone know of a flat-file handler, i.e. a quasi-database that > works with flat ASCII files for simple retrievals and reports, and > that is UNIX-based? Thanks in advance for any information. Dave Love Try awk! -- Brian Ampolsk @ Wynnewood *nix Consultants, Wynnewood, PA UUCP: ..!uunet!enkil!brian INTERNET: brian@enkil.UUCP