views:

131

answers:

1

When adding relationships to a database model in DB Designer 4, a composite primary key is being created every time.

So every foreign key I add, I get an extra key added to a composite primary key.

I think I must have changed a setting as I don't remember it doing this in the past.

Does anyone know how to turn off this feature as I prefer to use a single surrogate primary keys in my database tables?

+1  A: 

It sounds like you're using the Identifying Relation tools instead of the Non-Identifying Relation tools. In Design Mode which is default), in the left Tools panel, use the three Relation tool icons that are grouped with the New Region and New Table icon, not the three Relation icons that are on their own underneath:

alt text

This should almost certainly prevent new foreign keys being added to the composite primary key.

Raise
You are right. I presumed the use of all parents primary keys being added to a child record was a configuration setting bit actually that's is what makes it an identifying relationship. I much prefer pseudo primary keys. Much neater!
Jon Winstanley