Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: counting query



Joris Dobbelsteen wrote:
>>
>> CREATE TABLE attendance
>> (
>>  attendanceid serial primary key,
> 
> Why you have this??? You already have (entered,timeperiod,studentid)
> that you can use, since that must be unique too. Try to avoid surrogate
> keys as much as possible (it really increases performance and
> ease-of-writing for complex queries!


Correct me if I am wrong, but wouldn't a simple number be a lot easier
to look up than a composite key?



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group