proper format for this database table

John Salerno johnjsal at
Fri Oct 20 19:24:38 CEST 2006

Carsten Haese wrote:

>>> [id] [university] [yearStart] [yearEnd] [degreeEarned]
>>> 1     U of I       1971        1975      BS
>>> 1     U of I       1975        1976      MS
>>> 1     U of I       1976        1977      PhD
>> Thanks guys. I do plan to have an id entry for each person as well, I 
>> just forgot to mention that. But since it's a primary key, I didn't know 
>> I could list it more than once. Or does primary key not necessarily mean 
>> unique?
> Primary key *does* mean unique in the table that defines it. However, if
> you take a primary key ID from one table and store it in a different
> table, that's a foreign key. There are no inherent uniqueness
> constraints on a foreign key.

So in the example above, isn't that using the same primary key multiple 
times in the same table?

More information about the Python-list mailing list