This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes JDBC and the fly likes How to compress text data before storing it in database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How to compress text data before storing it in database" Watch "How to compress text data before storing it in database" New topic
Author

How to compress text data before storing it in database

Anand Achyut
Greenhorn

Joined: Jul 17, 2001
Posts: 6
Hello all
I am writing an application which needs to store lots of text data in database. Is there a way of compressing text data before i store it in Database. I use Oracle 8 database and Weblogic server for my application.
Please help!!!
Thanks in Advance
Anand
Phil Berggren
Greenhorn

Joined: Jul 13, 2001
Posts: 5
This isn't really compressing the text field, but it will get rid of leading and trailing spaces:
In your SQL statement to insert into your table add trim(FieldName) to each text field. For example if you have a text field called FirstName, it would be trim(FirstName), trim(LastName)......
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to compress text data before storing it in database
 
Similar Threads
Translation tool in java
i want to read from a textfield and compare it with an external file
Reading File from a hand scanner to a database
Best way for learning
Best practice for managing internationalised database content in JSF