Why does OutSystems promote the usage of dummy primary keys?

Why does OutSystems promote the usage of dummy primary keys?

  
The reasons to use dummy primary keys are:
  • Performance - indexes using a single integer column are much more eficient than indexes that use multiple columns;
  • Independence - relations don't depend on record data;
  • Coherence - it avoids replicating the same data all over the database;
  • Typed identifiers - if you had a multiple column primary key in the "User" table you would not have a "User Identifier".
Users desire intelligent, normally compound identifiers (more than one attribute), because there are more business oriented: they are the Unique Access Set to their data! Unique Access Sets are normally determined in a project because queries will probably use them either separately or all together. Nevertheless, if there's a need to effectively enforce the restriction of a compound key, Service Studio allows you to create an Unique Index on the entity that includes the attributes in the set that is, in fact, a secondary key.

Again, data independence strongly facilitates Data Administration in an organization. When you're designing an Entity to last, you should cope with CHANGE. Often in the past, larger enterprises faced migration problems because they chose to keep their primary identifiers intelligent (business meaning) instead of dummy. Hallmark never thought that a postcard could cost more than 99 USD even with inflaction so they chose the price as the primary identifier of Product. Imagine all the problems they faced when they decided to sell other items but postcards: for some time all of the most expensive items costed 99 USD!

That's the main reason why Data Administrators would rather have dummy identifiers to STORE entities instead of intelligent ones.