By drmjsommer on
I just installed Drupal 6, am reviewing the database model, and am not finding primary and foreign key table relationships. Is referential integrity not enforced at the database level, or am I missing something?
Thanks,
Martin
Comments
You're not missing anything
Drupal supports environments that don't have it, so Drupal doesn't use it (for now).
--
Anton
New to Drupal? | Troubleshooting FAQ
Example knowledge base built with Drupal
Database referential integrity
Thanks, I highly recommend it in future versions (I see your "for now" comment).
Also, regarding the next comment, creating a database abstraction layer does not eliminate the ability to fully use relational database features.
Enforcing referential integrity in the database now, creates a more valuable data set for later use by other tools and systems.
Martin
Any database abstraction
Any database abstraction layer throws away the best features of any specific RDBMS :/ Drupal's one is not an exception, more like a perfect example :/
HillsWeb.com
Hills Web
In the word "abstraction",
In the word "abstraction", there's "abstract", which recalls Object Oriented Modeling, IMHO the key to both extensibility and portabillity.
So I can't see why it should throw away any RDBMS-specific feature.
You may consider the data abstraction layer like an abstract base class (or interface) for any database engine backend.
A generic implementation could be based on ANSI SQL and provide empty implementation for extended features.
Thus the abstraction layer can -- as soon as it presents any benefit -- provide a superset of all database implementation features.
First benefits I think of:
Drupal being an open community project, with loads of contributed modules of disparate coding styles, which may be installed, updated, removed so easily, I think that referential integrity of database is a critical problem.
Best regards,
No reason not to have it
Just started investigating Drupal 6.4. I'm shocked to see no ref integrity in the Drupal core schema. I don't understand... there's no reason not to have it.