On Fri, 2 Mar 2012 13:26:23 +1100, BareFeetWare
<list....@barefeetware.com> wrote:

> Hi Rich,
>
>> I wanted to solicit some opinions about how best to layout a database table 
>> for a project I am working on.  I have a distributed application that 
>> reports run time information back to a central machine.  Included in the 
>> report are the parameters used during runtime... approx 25 or so.  
>> Parameters are site specific and may be changed locally by whomever runs the 
>> application.  I have a table that records an application instance (columns 
>> such as location, version etc), and a table that records report instances 
>> (time, date, size).  I wanted to be able to query at a glance the most 
>> recent parameter set in use, so I came up with the following table design...
>> 
>> Design A)
>> primaryKey | appInstanceId | reportId | param1 | param2 | ... | param25
>
> so that would be:

[snipped for brevity]

> Note that this will only give you results that
> actually exist, no extra nulls etc that aren't
> needed. It will be listed as rows, not columns,
> which is far more manageable and predictable.
>
>> I realize design A may not be "best", but I
>> would prefer an friendly answer and not a
>> canned response like I get from co-workers.


> Hopefully this was friendly and leads you towards "enlightenment" ;-)
>
> Tom
>
>Tom Brodhurst-Hill
>BareFeetWare

Excellent analysis!

-- 
Regards,

Kees Nuyt

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to