Not using foreign keys makes sense for some applications. WORM applications where you know you are loading accurate data, for example. Or times when it doesn't matter if an application bug corrupts your data.

But if you care about your data and if you can't trust your client to edit it correctly, you'd better have referential integrity. Size is irrelevant to that equation.

On May 22, 2007, at 7:12 PM, Naz Gassiep wrote:

I'm working in a project at the moment that is using MySQL, and people
keep making assertions like this one:

"*Really* big sites don't ever have referential integrity. Or if the few spots they do (like with financial transactions) it's implemented on the application level (via, say, optimistic locking), never the database level."

This sounds to me like MySQLish. A large DB working with no RI would
give me nightmares. Is it really true that large sites turn RI off to
improve performance, or is that just a MySQL thing where it gets turned
off just because MySQL allows you to turn it off and improve
performance? Can you even turn RI off in PostgreSQL? Does Oracle, DB2 or
MSSQL allow you to turn it off? Am I just being naive in thinking that
everyone runs their DBs with RI in production?

- Naz

---------------------------(end of broadcast)---------------------------
TIP 3: Have you checked our extensive FAQ?

               http://www.postgresql.org/docs/faq


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to