• Coincidentally I started an internal article for my company, the same day this was posted, on Referential Integrity (RFI).

    Some other considerations for a lack of RFI are poor database designs including the shared use of one column to represent many columns. I have witnessed numerous instances of a column we will call "someEntityID" which implicitly references other Entity IDs in other tables. The problem is that there is no actual RFI. The value in the someEntityID column could represent one of a dozen other primary keys in other tables. There are no foreign keys to establish the relationship. It is all implicit and merely coincidental if a value does exist in Table X and references a value in another table.

    Besides the RFI issue it is of poor DB design. One should be able to look at a column and know what it represents. One should not have to guess what the column represents or perform klugey LEFT OUTER JOINS or create ad hoc mapping tables. Yes, you could create an additional column to provide context to the column to identify what that particular instance of a column means per record but why? It is non-intuitive and more importantly breaks RFI. It also does not support Codd's 12 rules for a relational database; specifically Rule 0 and Rule 10.