Subject Database design question
Author kogerbnz

First, I hope this is the right group to ask a design question. If I
choose the wrong one, then I'm sorry, but please tell me where to go.

I have a database design problem, that I'm not sure I have solved in
the best way.

I have a user table. Each user can make a log once a day. So I'm
creating a new table which has UserID as a foreign key and a primary
key which is a combination of UserID (the FK) and a date column.
Is that a good design?


UserID (FK and also Part of PK)
Date (Part of PK)

Or would it be better to have an artificial auto incremented PK, and
make a constraint not allowing two rows with the same UserID and date.

UserID (FK)

In a way the last seems a bit more straight forward, but does add an
extra column and constraint.

Thank you for your comments