blob

Storing a hash as byte array with JPA

My User entity class contains password hash field, which is a byte array with a fixed length (32 since it's an SHA-256 hash). @Entity public class User { @Column(nullable=false) private byte[] passwordHash; ... } As you can see, I haven't annotated it with anything special, just a NOT NULL. This works, but will it perform...

pushing data to a clob with spring JDBC; what if I don't know the length?

Here's a bit of example code from the spring doc. Note that it passes the length of the clob and blob data to the lobCreator. What if I don't know the length? Do I have any choices save to buffer? jdbcTemplate.execute( "INSERT INTO lob_table (id, a_clob, a_blob) VALUES (?, ?, ?)", new AbstractLobCreatingPreparedStatementCallback(lo...

how to get mysql command line client not to print blob fields in select *

Exploring some tables which have blob fields. How could I do a select * with the command line client and have it surpress the printing (or truncate to a standard field width) the blob fields rather than scrolling a bunch of binary junk on the screen? This is with mysql 5.1 client. Just want to do a select * and not list all of the non-...

view a docx file in C# .NET

I need to create C# .NET solution to view a .docx file directly from the database without writing on the hard disk. What would be the most feasible approach ? One option would be to convert the docx file to .mht format and save in the database as blob type. But I could not find a way to directly view it from the database. Another way ...

ensuring dynamic image urls in a web-app: use a blob store?

I want to serve images in a web-app using sessions such that the links to the images expire once the session has expired. If I show the actual links to the filesystem store of the images, say http://www.mywebapp.com/images/foo1.jpg this clearly makes stopping future requests for the image (one the user has signed out of the session) dif...

Best strategy for storing documents in SQL Server 2008

One of our teams is going to be developing an application to store records in a SQL2008 database and each of these records will have an associated PDF file. There is currently about 340GB of files, with most (70%) being about 100K, but some are several Megabytes in size. Data is mostly inserted and read, but the files are updated on oc...

Storing a User's Signature in MySQL

I need to store user's signature (ie the thing at the bottom of a forum post) and am not sure how to, I could use text to store the html, but I think there are probably better solutions. ...

Timeout updating blob field using Entity Framework 4

I'm using EF4 to update a table with blob field. My code snippet is below: public void SavePolicyDocument(int policyID, int batchID, byte[] file) { PolicyDocument policyDocument = GetPolicyDocument(policyID, batchID); policyDocument.DocumentImage = file; myEntities.PolicyDocuments.ApplyCurrentValues(policyDoc...

how to view blob content

JavaBean has some field type of byte[]. Bean is stored in DB to BLOB type of column. I know that it is XML message. How can I see this XML message. thank you very much for your help! ...

How to fetch Blob as an image

I have inserted an image as a blob in a sqlite. Now how can I fetch that blob as an image or how can I convert that blob into image file. ...

Replace a word in BLOB text by MySQL.

Hello! I've got a huge mysql table (called tcountriesnew) and a column (called slogen, blob type). In each of those slogen blobs I'd like to replace a word, for example: banana to apple. Unfortunately I tried to print all the rows with word banana, and it did not work. select * from tcountriesnew where slogen like '%banana%'; Please ...

Multi camera calibration with CCV(tBeta)

Hi, For my project i want to calibrate two cameras with CCV. in CCV, as i have seen, the camera is placed under a surface and blobs are detected from the surface. but in my project i want to detect blobs from over the surface one camera is placed on top of the surface(wall) facing the floor so it can detect the X coordinate other camera ...

NoSQL database and many semi-large blobs

Is there a NoSQL (or other type of) database suitable for storing a large number (i.e. >1 billion) of "medium-sized" blobs (i.e. 20 KB to 2 MB). All I need is a mapping from A (an identifier) to B (a blob), the ability to retrieve "B" given A, a consistent external API for access, and the ability to "just add another computer" to scale t...

MySQL data is too long for column occuring on LONGBLOB

I have the following MySQL (version 5.1) table (InnoDB): Username varchar(50) Sequence int(11) FileType varchar(10) Photo longblob -- here PhotoSize int(11) Timestamp datetime Attempting to insert a byte[] 96.7KB fails with the error: Data Too Long For Column 'Photo' At Row 1 Inserting byte[] (size 37.2KB) works fine. ...