This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: The pain of joining tables, are there any alternatives?
 
Similar Threads
abstract data type
New to Hibernate
Unknown error with JDBC code or with driver.
Resultset processes 1 record
howto make table in position side by side ?