Like Robert Ivens started his post:
ROCLASI wrote:I think this whole discussion hinges on 2 thoughts/perspectives. The relational database way of doing things and the way your query tool-stack prefers things to work.
As we're all using Servoy, we need to keep in mind that Servoy has no knowledge about direct changes on the DB (like cascade update)
Still there could be valid reasons to use natural keys, even in Servoy.
Think about retrieving and storing data from an 3rd party API which does not include a unique key, other than the combination of 2 fields.
In order to avoid storing duplicates and executing additional queries to find out whether the entry already exists, using the combination of these fields as a PK is a much smoother solution.
In this example these fields will never change.
Along the way this thread has gone mainly off-topic, answering all other related-issue questions but the original one of Robert Huber...
Rephrased:
What is the best way to name/setup my multi-column PK in Servoy, in order to have Servoy use the most selective column first in the where clause, as this will gain performance in your backend DB.
Personally I haven't tried this yet, but maybe someone else has?
Anyone from Servoy?