aspose file tools*
The moose likes JDBC and the fly likes The pain of joining tables, are there any alternatives? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "The pain of joining tables, are there any alternatives?" Watch "The pain of joining tables, are there any alternatives?" New topic
Author

The pain of joining tables, are there any alternatives?

Timothy Sam
Ranch Hand

Joined: Sep 18, 2005
Posts: 746
Hi, I was wondering if there are any other way to insert records in the database to avoid too many joins. Ihave more than 10 tables to join, maybe 11 or 12... When constructing the query, it's just too lengty... Are there any other technniques you could suggest? Thank you.


SCJP 1.5
http://devpinoy.org/blogs/lamia/ - http://everypesocounts.com/
Paul Sturrock
Bartender

Joined: Apr 14, 2004
Posts: 10336

You could denormalize your tables. But that would be a bad thing, since it would weaken your data model and open your data up to corruption. It is the sort of thing you might do if the number of joins in a query were impacting performance, but if your only gripe is it takes a long time to write SQL I wouldn't do it.
[ June 09, 2006: Message edited by: Paul Sturrock ]

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
 
Don't get me started about those stupid light bulbs.
 
subject: The pain of joining tables, are there any alternatives?