B
B
BonBon Slick2021-03-20 17:31:37
Database design
BonBon Slick, 2021-03-20 17:31:37

What is the advantage of Foreign Key as Primary Key?

Since we are talking about RDB,
Doctrine 2 Docs

is used as an example. Everything is great, but apart from reducing the sampling speed, I do not see any obvious advantages.

For example, there is a User entity and it has UserDetails.
User (password, email, id, nickname), UserDetails (bornAt, firstName, lastName, adress, description....)

Now I use the usual approach with Natural key surrogate key aka simple surrogate key

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question