Orchard database lacks referential integrity

5/15/2008 7:55:33 PM

I took a quick look at the schema of the Orchard database. There's some tables there but it seemed to lack any FK constraints.

I ran this script that lists all foreigk keys constraints in a database (found here)

SELECT   ref.constraintname AS FKName   fk.tablename AS FKTable  FROM   INFORMATIONSCHEMA.REFERENTIALCONSTRAINTS ref  INNER JOIN    INFORMATIONSCHEMA.TABLECONSTRAINTS fk  ON    ref.constraintname = fk.constraintname  ORDER BY   fk.tablename,   ref.constraintname;

And yupp, not a single record returned!

This is a bit strange.., I sometimes see people skip FK, "We do that in the code" but I always thought of them as newbies who didnt yet realize the importance of integrity. But these Orchard guys skipping it?! Maybe theres an explanation somewhere... anyway, hope they do integrity well "in code".