[prog] database schema

Wolf Rising wolfrising at gmail.com
Fri Jun 3 11:40:29 EST 2005


It's that UserID and techID together form the primary key, I didn't know how
exactly to display that, I should have thought to put parenthesis around it,
sorry. So anywhere I listed more than one PK in a table, I meant it as
( I think this
is the correct term) a composite primary key.

Thanks :-)

On 6/2/05, Jacinta Richardson <jarich at perltraining.com.au> wrote:
> Wolf Rising wrote:
> 
> > Machine Assigned
> > userID               int   PK
> > techID               int   PK
> > issueDate            date
> > returnDate           date
> 
> I have a question about your syntax here.  Are you saying that userID and techID
> are *independant* primary keys to this table or are you saying that userID &&
> techID together form the primary key?  I'm pretty sure it's the second.
> 
> Usually it's easier to explain this by writing:
> 
> # Two-field primary key
> 
> Machine Assigned
>  > userID               int
>  > techID               int
>  > issueDate            date
>  > returnDate           date
> primary key (userID, techID)
> 
> # Two independant primary keys
> 
> Machine Assigned
>  > userID               int
>  > techID               int
>  > issueDate            date
>  > returnDate           date
> primary key (userID)
> primary key (techID)
> 
> 
> Likewise for your other tables, if you could clarify this for me I'll be happy
> to discuss 3rd normal form and these table with you.
> 
> All the best,
> 
>      Jacinta
> 
> --
>     ("`-''-/").___..--''"`-._          |  Jacinta Richardson         |
>      `6_ 6  )   `-.  (     ).`-.__.`)  |  Perl Training Australia    |
>      (_Y_.)'  ._   )  `._ `. ``-..-'   |      +61 3 9354 6001        |
>    _..`--'_..-_/  /--'_.' ,'           | contact at perltraining.com.au |
>   (il),-''  (li),'  ((!.-'             |   www.perltraining.com.au   |
> 
> 
> _______________________________________________
> Programming mailing list
> Programming at linuxchix.org
> http://mailman.linuxchix.org/mailman/listinfo/programming
>


More information about the Programming mailing list