File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes What to store Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "What to store" Watch "What to store" New topic

What to store

ryan sukale
Ranch Hand

Joined: Aug 11, 2007
Posts: 53
Hi Ranchers.

When you have an application that has a large number of entries posted by a user, like a forum, where do you store all this stuff??
In database field typed as CLOB/BLOB?

I mean that when we have all these forum posts, where do they all go? Putting them into a database using CLOBS/BLOBS would result in lowering in response time for each request.

How does forum like javaranch or any other forum do it? Give me an idea, because i have never dealt with databases before.

Kindly help.

Thanks in advance.

SCJP 5.0, SCWCD 5.0, SCBCD 5.0
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
The standard approach would be to use a VARCHAR, not a CLOB.

What do you mean by "lowering in response time" - compared to what?
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33121

When designing a database, you want to make it possible to look up information. Think about finding a post in this forum. I don't just want to all the posts that you made. I also want to look up threads, do searches, etc. If I had all your posts in one CLOB, they would be extremely difficult to find.

A much more logical approach is to have a posts table so we can lookup each thing individually. This forum uses the database structure provided by (with a few things added on.) I recommend looking at their site if you are curious about the exact schema.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: What to store
jQuery in Action, 3rd edition