database - DB Fk/Pk keys performance -


in our db have single centric table millions of rows being inserted , updated. table has single column acting unique identifier , used link content of table mutliple tables 1 many relation.

this means wehn inserting entry to, say, users table, in same transaction users_pets , users_parents (and 10 more) populated, multiple rows, based on same unique identifier main table.

since application using db inserting new entries , updating existing ones relation between these tables kept @ application level (i.e. logical erd instead of handling via fk/pk decelrations).

questions:

  1. is correct assume pure performnces point of view, best approach?
  2. is there way set these keys (so db more self descriptive) without impacting performaces?

  1. no, same reason use seatbelts in cars when in hurry. difference negligeble , totally not worth it.
  2. some specific dbms vendors may offer way of declaring constraints while not enforcing them. in oracle example, can specify integrity constraint state disable novalidate.

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -