Answer the question
In order to leave comments, you need to log in
Is it bad to have redundant foreign keys in a database?
I want to create a base part of the structure which will look like this:
table_one ---(many)---< table_two ---(many)---< table_three ---(many)---< table_four
Answer the question
In order to leave comments, you need to log in
It's always a trade-off: normalization vs convenience/performance. Denormalization is often used in practice, so I don’t consider it a bad decision, provided that after that there will be no mess in the database. How to achieve this is another question.
If many joins do not harm performance (for example, there is little data in tables), then it is easier to use views to reduce development time (using these tables in queries) and prevent integrity violations when updating / inserting / deleting.
Different DBMSs have native mechanisms to support denormalized relationships, such as something like materialized views in Oracle.
In general, normalization is the enemy of performance.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question