wood burning stoves 2.0*
The moose likes JForum and the fly likes Why there is no foreign key in the schema? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » JForum
Bookmark "Why there is no foreign key in the schema?" Watch "Why there is no foreign key in the schema?" New topic
Author

Why there is no foreign key in the schema?

Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Hi, all.

I am working on jforum. I did not see any foreigh keys in MySQL schema. In the jforum_model document I see the relationships, but the relationships are not reflected in the database schema.

Can anyone explain this?


Thank you very much.

David
[originally posted on jforum.net by davidxia]
Migrated From Jforum.net
Ranch Hand

Joined: Apr 22, 2012
Posts: 17424
Don't know for sure but I'd guess it's for simplicity across all the different DB's jForum supports. Some of them don't (or didn't at creation time) support foreign key constraints.

Plus hard constraints sometime make it harder to set up the initial data and do extracts from production to test sites. Not good DB schema practice, but there is no performance hit for not having these.

Then again, it could just be because Rafael's more interested in code that DB modeling...lol


[originally posted on jforum.net by monroe]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Why there is no foreign key in the schema?