database relationships

前端 未结 8 1276
无人共我
无人共我 2021-01-16 09:15

does setting up proper relationships in a database help with anything else other than data integrity?

do they improve or hinder performance?

相关标签:
8条回答
  • 2021-01-16 09:57

    As long as you have the obvious indexes in place corresponding to the foreign keys, there should be no perceptible negative effect on performance. It's one of the more foolproof database features you have to work with.

    0 讨论(0)
  • 2021-01-16 10:08

    It neither helps nor hurts performance in any significant way. The only hindrance is the check for integrity when inserting/updating/deleting.

    Foreign keys are an important part of database design because they ensure consistency. You should use them because it offers the lowest level of protection against data screw ups that can wreck your applications. Another benefit is that database tools (visualization/analysis/code generation) use foreign keys to relate data.

    0 讨论(0)
提交回复
热议问题