954,593 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Lots of Foreign keys...locking?

Hello,
I have a database with about 25 tables and almost every table having a foreign key on some other table. They system needs to deal with a large number of reads and writes. I'm concerned if having too many foreign keys and relationships between tables will lock the tables on inserts and updates and this might reduce the concurrency on table access. What should I look out for?

jetru
Light Poster
27 posts since Jun 2006
Reputation Points: 10
Solved Threads: 0
 

if we consider the purpose to use foreign key is to link one key to another table so we can keep look up the detail information in separate table
but it has consequences: if will speed up searching but it will slow down the update.
if the parent table has only few records and only one field e.g. sex it will be male or female; i think it is better to put the value directly instead of using separate table.
Also if the additional record is unlikely to be added don't use it

it is my opinion

asaukani
Light Poster
44 posts since Mar 2010
Reputation Points: 13
Solved Threads: 9
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You