NYCPHP Meetup

NYPHP.org

[nycphp-talk] Database, table, and column naming schemes

Kristina Anderson ka at kacomputerconsulting.com
Tue Oct 6 16:10:38 EDT 2009



> >In cases where the userid - accountid pairs are always unique, the
> >additional PK is redundant (although 99% of the time it's there 
anyway
> >due to lazy design).  A "lookup" table whose sole purpose is to 
create
> >relationships between the two other tables should not have duplicate
> >userid-accountid pairs.
> >
> >In another case, let's say you have a table containing logon
> >information which stores userid and accountid along with other data 
in
> >each row.  In this case you'd have multiple instances of the same
> >userid-accountid pairs, and you'd need a separate PK to uniquely
> >reference specific instances of that pair in the table.
> >
> >Kristina
> 
> 
> I think I said I agreed with that.
> 
> Cheers,
> 
> tedd
> 
> -- 
> -------
> http://sperling.com  http://ancientstones.com  http://earthstones.com
> 
> 

Tedd,

Absolutely, you did, but what I was trying to say (poorly I guess) was 
that a lot of what Dan put out there (which was fantastic stuff) 
related (at least insofar as my understanding of it) only to the first 
case where there aren't any duplicate userid-accountid pairs.

Kristina



More information about the talk mailing list