[Leaplist] coding - rdbms, revisions, and fks

Phil Barnett philb at philb.us
Thu Dec 3 22:41:09 EST 2009


On Thu, Dec 3, 2009 at 4:42 AM, John Simpson <jms1 at jms1.net> wrote:

> as you process the mail pieces, you execute "INSERT INTO history" queries
> which contain the mid (mailing id you're processing) and mseq (sequence of
> this piece within the processing of that mailing, which your program will
> calculate in memory as you go along) as well as the full contents of the
> "people" and "messages" records you're using to get the data for the label.


You can certainly do this, but it's wasteful.

All you really need in the history is:

1. Original records that generated the mailing that don't change. If you
need to edit them, save a new different copy with a new differnent id. Link
the two records together so you know they are cousins.

2. History tables with dates and pointers to the original records.

This consumes less space.

Duplicating data that is already in the system is wasteful if you can refer
to an original copy of it.

-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.leap-cf.org/pipermail/leaplist/attachments/20091203/ab83feaf/attachment.html


More information about the Leaplist mailing list