This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
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]
 
Consider Paul's rocket mass heater.
 
subject: Why there is no foreign key in the schema?
 
Similar Threads
JPA entities -- org.hibernate.TypeMismatchException
EJB 3 in Action - JPA Doubt
OneToMany Unidirectional relationship without Join table (JSR 220)
HAS-A-Relationship (K&B)
iBatis object relationships