Settings

Theme

Operating without foreign key constraints

docs.planetscale.com

21 points by KwisaksHaderach 4 years ago · 2 comments

Reader

GianFabien 4 years ago

I have encountered the problems described for MySQL with Oracle and DB2 databases. If you implement the business rules as transactions within stored procedures, then the logical constraints can be maintained programmatically by the StoredProcs.

  • errcorrectcode 4 years ago

    As long as the constraints are maintained within the DB correctly, it's cool. Some constraints are more complicated than FK constraints allow. Implementing as close to the DB as possible is a good idea.

    To do it in app code would be a terrible idea because it throws FK referential (and data) integrity out the window.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection