Jan Wieck JanWieck
Tue Apr 4 21:07:24 PDT 2006
On 4/4/2006 5:19 PM, Andrew Sullivan wrote:
> In most cases, the multi-column key is an excellent choice.

I so much agree with all of it. Usually, the existing primary key or any 
business process implied unique-not-null column set will be an excellent 
choice.

Hint: If your business rules assume a set of columns to be unique, and 
they are not defined as not null and unique, your database schema is not 
mapping your business rules. You are not only missing a candidate key 
usable by Slony here, you are missing a database side data consistency 
check! Whenever you find a table without a primary key, first ask if 
this really represents the business process requirements. The only thing 
that tends to escape that question is usually some audit, logging or 
history table, where adding a bigserial is no big deal anyway.


Jan

-- 
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck at Yahoo.com #



More information about the Slony1-general mailing list