Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-17-2008, 10:49 AM
Member
 
Join Date: Oct 2008
Posts: 7
Rep Power: 0
hkansal is on a distinguished road
Default parsing/storing large text data
Hi All,

I have seen a lot of pre-cooked java forum packages on the net but I would like to code my own and hence need some support. I have expertise in databases and have designed the required schema. Now to start I would like to have some help on this issue:

In forums, eg this one, users may reply with long text inputs. What would be the best way to store them? One option is to use a Text field in the database which stores 65K characters. Another is to convert the large text to binary and store.

Pls tell if there is any other option, else how shall I about accomplishing the second one?

Thank You.
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 10-18-2008, 11:57 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 7,513
Rep Power: 11
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Default
I don't know there is any other way is available. Over the years I'm using Text in SQL. It's much better so far so good. Even though data converted into binary values, I think no need to convert them into binaries within our code.

What you are trying to do with this. Performance wise I don't see any issues working with Text.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
Someone helped you? their helpful post.
Help:Forums FAQ|How To Ask Questions The Smart WayResources:The Java Tutorials|Glossary for Java|NetBeans IDE|Sun DownloadsWeb:WritOnceTips:Is your IDE the best?|Which Application Server?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 10-18-2008, 05:24 PM
Nicholas Jordan's Avatar
Senior Member
 
Join Date: Jun 2008
Location: Southwest
Posts: 1,018
Rep Power: 3
Nicholas Jordan is on a distinguished road
Post is server to be remote?
Originally Posted by hkansal View Post
Hi All, I have seen a lot of pre-cooked java forum packages on the net but I would like to code my own and hence need some support. I have expertise in databases and have designed the required schema. Now to start I would like to have some help on this issue:
Can you provide some detail as to whether these databases are commercial in nature or student work, and is the database to be loaded onto a server remotely or can you code the whole thing directly in the application. The reason I ask this is expertise in databases and would like to have some help on this issue taken together suggests to me you will be taking a pure database approch. That raises in my mind an obvious ambiguity along the lines of one can write a file very simply with code, and storing data as a string or as binary is not a paticularly difficult design issue. So it is, politely intended, what gives here. (?)

Originally Posted by hkansal View Post
In forums, eg this one, users may reply with long text inputs. What would be the best way to store them? One option is to use a Text field in the database which stores 65K characters. Another is to convert the large text to binary and store.
Compression, through available Java classes is available but given the massive storage available at commodity pricing I would focus on "what makes sense to you" before I would look to established design for preliminary concepting. I see a lot of work in Marty Hall's Core Servlets book that may provide a better starting place than considering the matter directly, there are some issues related to scaling that may be of profound consequence later. If this will ever run on a distributed Tier-1 arena, that would be well worth the effort later.

Originally Posted by hkansal View Post
Pls tell if there is any other option, else how shall I about accomplishing the second one?
There are plenty of options, as long as you stay with Java, the competitors are not True Beans.
__________________
Introduction to Programming Using Java.
Cybercartography: A new theoretical construct proposed by D.R. Fraser Taylor
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 10-19-2008, 07:32 PM
Member
 
Join Date: Oct 2008
Posts: 7
Rep Power: 0
hkansal is on a distinguished road
Default
The database is designed to hold data in a recursive manner, self-referencing keys leading to space optimization. The doubt I had was raised because if text is saved as text itself,
1. it occupies more space.
2. there is a limit to the number of characters. Posts in a forum may exceed that.
also there is a feature in all databases to store large objects, and objects in binary form. this method i can use to also save images in the db itself(though i am not planning to do that).

Kindly advise me the good techniques to go about solving my problem.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 10-19-2008, 07:34 PM
Member
 
Join Date: Oct 2008
Posts: 7
Rep Power: 0
hkansal is on a distinguished road
Default
And yes, this is a student work and but the whole db can be coded in the application itself or uploaded remotely, both.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
problems about storing binary data to mysql db using PreparedStatement xiechao New To Java 0 04-22-2008 12:57 PM
[SOLVED] How to Extract Data From this text file? jazz2k8 New To Java 31 04-18-2008 11:45 AM
Storing data permanently shaungoater New To Java 2 03-10-2008 05:18 PM
Displaying data into text area abhiN New To Java 1 01-22-2008 11:30 AM
Storing Data Khorod New To Java 1 08-03-2007 06:48 AM


All times are GMT +2. The time now is 09:10 AM.



VBulletin, Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org