is it bad to add surrogate key to each table in addiction to the natural primary key?

233 Views Asked by At

Is it considered bad to add surrogate key (ID column) to each table in addition to the natural primary key? If it is not is the model still considered relational?

I ask because stand alone surrogate keys remove the contextual meaning of the columns. I found that surrogate keys increase the performance when dealing with joins, in the laravel framwork, and the ORM requires each model to have a surrogate key (I think it is for performances).

1

There are 1 best solutions below

1
On

Using surrogate keys is standard practice in a dimensional model but they are rarely used in a transactional model - so whether you should be using them depends on the type of data model you have or, possibly, on any restrictions/requirements that the apps you have, that access the data model, enforce