I'm the secretary of an association and responsible for keeping their membership lists. As a Linux user, it seemed natural to me to keep the membership records in a database and along the way I discovered two applications which make life very much easier for the non-programmer.
PostgreSQL is the database that I use, mainly because I like to have all the features available and I have never had any stability problems with it. For database design and data entry, I discovered the handy pgaccess application which presents an interface not dissimilar to a more famous program with a similar name. The notebook window which is displayed when you start up has tabs for Tables, Views, Forms, Queries and so on, while each one contains a list of available items and some actions on them. Once the command "CREATE DATABASE members;" had been given at the psql command line, it was simply a case of inputting the database details into pgaccess's "Open Database" window to be able to start entering the information.
pgaccess was downloaded as part of PostgreSQL, available from ftp.postgresql.org/pub and its home page is at http://flex.ro/pgaccess/
The report generator of pgaccess is not yet finished, so I was left with the problem of how to get the data out. I usually use LaTeX for writing letters and reports, so I was quite happy to discover the GNU Report Generator, gurgle, which was originally designed to work with that. To use it, you write a short gurgle script which includes a few definitions, the database query and the template for outputting the data to another file. Here's my script to print envelopes:
%%define PHYSDB "members" %%define NAMCOL %%define TEXEXT .tex %%database "members.sql" select name, institution, mailaddress from memberdetails %%header
%%record \envelope{%NAME \ %INSTITUTIO \ %MAILADDRES}
%%footer
%%end
The first line sets the database name to connect to, the next tells gurgle to use the names from the query, the third says to save the file with the .tex extension, then we have the query. An empty header and footer surround the record template, which simply puts the database results in a call to my "envelope" macro with some line breaks.
The file is then included into my envelope printing file (which also contains the association's logo, etc) and any small changes (replacing commas in the address with line breaks, for example) are done before sending the file to the printer and generating a stack of printed envelopes for a mailshot.
Gurgle can be downloaded from http://www.gnu.org/directory/GURGLE.html or http://www.dai.ed.ac.uk/homes/timc/gurgle/ and has optional modules for GNUSQL, PostgreSQL, MySQL and CA-Ingres databases as well as text dump files.
Comments? Improvements? Your alternatives?