This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes JavaDB maximum BLOB size Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JavaDB maximum BLOB size" Watch "JavaDB maximum BLOB size" New topic
Author

JavaDB maximum BLOB size

Peter Chase
Ranch Hand

Joined: Oct 30, 2001
Posts: 1970
Hi,

I have an application that stores binary data in BLOBs in a JavaDB (aka Derby) database. The data is usually quite small (e.g. 10 kilobytes) but just occasionally rather larger (we've seen 500 kilobytes).

When I first wrote the application, I somewhat arbitrarily specified 256 kilobytes as the maximum BLOB size. The 500k data therefore overflowed this.

I could just raise the limit a bit. However, I have some questions.

Is there any benefit to minimising the specified BLOB size?

If no limit is specified, you get the JavaDB limit, which is 2GB, I think. Does it save disk space or improve performance to limit the size?

Is there any reason why I shouldn't just remove the limit altogether and let it go up to the JavaDB limit (which it won't even get close to hitting - I hope!).


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32609
    
215

Peter,
As far as I know, the database stores a pointer to the BLOB in the part of the table with the other columns. So I don't think there would be ramifications to changing the BLOB size. In fact some databases don't even allow you too set the maximize size. The true maximum is set by the database and if you use less it is fine. They don't introduce an artificial limit.


[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: http://aspose.com/file-tools
 
subject: JavaDB maximum BLOB size
 
It's not a secret anymore!