Re:DHH: we're already overloaded with connectivity
by damien on Monday April 02, 2007 @01:58PM
(#8269)
A primary key is really just the combination of the unique and not-null constraints. My preferred way of handling this is to have a surrogate key as the primary key (for performance and general ease-of-use), but also apply multi-column unique constraints on the natural key to enforce data integrity. The main place where I don't use a surrogate key is for many-to-many join tables (which I think is the common practice).
[ Parent
| on HN ]
There are no comments on this comment yet.