I’m doing web application for many users.
Application will has many modules – register, search, question-answer, forum and blog.
I’m going to implement blog module for each users registered on my site.
Blog can has a title and body. The maximum length of body can not be more than 6000 symbols.
How better to do it (blog) ?
Which type for body will be better varchar or blob?
Or may be realy better do it in second database separately from the main webapp db?
Or use external service if such a service exists?
PS: technologies: java, spring, JPA, PostgreSQL
For storing texts I suggest using PostgreSQL’s
textdatatype for the field. I think using a second database is unnecessary. For such common scenarios like blogging, I suggest using customizable third-party modules instead of reinventing the wheel. Have a look at Pebble at http://pebble.sourceforge.net/