-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: @LOB or path to file?
PostPosted: Tue Jun 02, 2009 4:58 am 
Regular
Regular

Joined: Tue Jun 03, 2008 1:12 pm
Posts: 84
Location: germany
I want to store large data objects (size of a data object ~ 100-200 MB) via Hibernate (and mySQL).

What is better:

- to store only the path of a data object in a database:

Code:
@Column(name = "PATH_TO_FILE", nullable = true, insertable = true, updatable = true)
private String pathToFile;


or to store it via LOB. If stored via @Lob, how should I do the mapping:

this way:

Code:
@Lob
private byte[] file;


or that way:
Code:
@Lob
private Blob file;


where lies the differences? Are there other (better) ways?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.