From: | Mike Nolan <nolan(at)gw(dot)tssi(dot)com> |
---|---|
To: | b(dot)wood(at)niwa(dot)co(dot)nz (Brent Wood) |
Cc: | ioverton(at)mappingandbeyond(dot)com (Ian Overton), pgsql-general(at)postgresql(dot)org |
Subject: | Re: Data Entry Tool for PostgreSQL |
Date: | 2005-09-26 18:32:38 |
Message-ID: | 200509261832.j8QIWdYr023578@gw.tssi.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> I would have thought a php appliction would be able to this fairly
> easily. My data entry scripts insert the new records with just a primary
> key, then iterate through the various fields using an update sql for each
> one which is not null.
A generalized program to do this for (nearly) any table is not a trivial
task. For a start you have to deal with knowing the difference between
an insert and an update, perhaps provide some kind of record-locking
scheme so it works in multi-user mode, do something about record keys
(whether using OIDs or some other unique single field), and deal with
quotes and other characters that cause problems for either web pages
or SQL statements.
Things like supporting a variety of search features, data type checking
(eg, making sure that a date or an integer is valid BEFORE trying an
insert/update), lookups on related data (for example, displaying the name
from a customer record when the ID appears in an order record), user
passwords, data access security levels, data formatting, etc. all add
complexity.
The main program I've been working on for about two years now is nearly
3200 lines long at this point. It has about 95% of the items on my
original wish list of features. It's been in use at a client's office
since March of 2004 and is used to maintain their database of over 600,000
members, among other things.
Could I write separate PHP programs to handle each table? Yes, and in
fact I've been doing that where I've needed to.
But I can build a full-featured query tool (with search, insert, update
and delete capabilities) for a new table in under 20 minutes, and it will
have the same look and feel as a couple dozen other programs for other
tables. That's saved me a BUNCH of time both in development and in training.
--
Mike Nolan
From | Date | Subject | |
---|---|---|---|
Next Message | Yonatan Ben-Nes | 2005-09-26 18:41:03 | Re: How many insert + update should one transaction handle? |
Previous Message | Jan Wieck | 2005-09-26 18:02:48 | Re: Replicating new sequences |