blob

Storing Images in DB - Yea or Nay?

So I'm using an app that stores images heavily in the DB. What's your outlook on this? I'm more of a type to store the location in the filesystem, than store it directly in the DB. What do you think are the pros/cons? ...

BLOB Storage - 100+ GB, MySQL, SQLLite, or PostgreSQL + Python

I have an idea for a simple application which will monitor a group of folders, index any files it finds. A gui will allow me quickly tag new files and move them into a single database for storage and also provide an easy mechanism for querying the db by tag, name, file type and date. At the moment I have about 100+ GB of files on a coupl...

Can a Linq query retrieve BLOBs from a Sql Database?

And how do they come out? ...

Rails Binary Stream support

I'm going to be starting a project soon that requires support for large-ish binary files. I'd like to use Ruby on Rails for the webapp, but I'm concerned with the BLOB support. In my experience with other languages, frameworks, and databases, BLOBs are often overlooked and thus have poor, difficult, and/or buggy functionality. Does RoR ...

Stop Activerecord from loading Blob column

How can I tell Activerecord to not load blob columns unless explicitly asked for? There are some pretty large blobs in my legacy DB that must be excluded for 'normal' Objects. ...

Speed of online backups with BLOBs

In Oracle 8 doing an online backup with BLOBs in the database is extremely slow. By slow, I mean over an hour to backup a database with 100MB of BLOB data. Oracle acknowledged it was slow, but wouldn't fix the problem (so much for paying for support.) Does anyone know if Oracle has fixed this problem with subsequent releases? Also, how f...

How do I display the full content of LOB column in Oracle SQL*Plus?

When I try to display the contents of a LOB (large object) column in SQL*Plus, it is truncated. How do I display the whole thing? ...

Using PL/SQL how do you I get a file's contents in to a blob?

I have a file. I want to get its contents into a blob column in my oracle database or into a blob variable in my PL/SQL program. What is the best way to do that? ...

Storing Crystal Reports Files in Database?

I've got a UI front end which talks to and manipulates a SQL Server database, and one of the things it can do is run reports on the data in the database. This UI can be installed on multiple computers, and so far I've just been keeping the reports in a folder with the install, but this means that any time a new report is added is has t...

Where to store uploaded files (sound, pictures and video)

A while a go I had to developed a music site that allowed audio files to be uploaded to a site and then converted in to various formats using ffmpeg, people would then download the uploaded audio files after purchasing them and a tmp file would be created and placed at the download location and was only valid for each download instance a...

How to store images in your filesystem

Currently, I've got images (max. 6MB) stored as BLOB in a InnoDB table. As the size of the data is growing, the nightly backup is growing slower and slower hindering normal performance. So, the binary data needs to go to the file system. (pointers to the files will be kept in the DB.) The data has a tree like relation: - main site -...

From String to Blob

I am trying to use concat_ws inside a group_concat command. With a query, which simplified looks like: SELECT item.title, GROUP_CONCAT( CONCAT_WS( ',', attachments.id, attachments.type, attachments.name ) ) as attachments FROM story AS item LEFT OUTER JOIN story_attachment AS attachments ON item.id = attachments.item_id GROUP BY ...

Kohana PHP, ORM and MySQL BLOBs

I'm trying to create and retrieve a BLOB in a MySQL table via Kohana's ORM library. The code looks something like: $attachment = new Attachment_Model(); $attachment->name = $info['FileName']; $attachment->size = strlen($info['Data']); $attachment->data = $info['Data']; $attachment->mime_type = $info['content-type']; $attachment->save()...

Storing Documents as Blobs in a Database - Any disadvantages?

The requirements for my document management system were: Must be secure from theft by simple copying of directories, files etc. Must be secure against traditional virus infection (infection of physical file) Must be fast to retrieve The repository must not be visible to casual (directory) browsing users etc. I have decided to store a...

How do I find the length (size) of a binary blob in sqlite

I have an sqlite table that contains a BLOB file, but need to do a size/length check on the blob, how do I do that? According to some documentation I did find, using length(blob) won't work, because length() only works on texts and will stop counting after the first NULL. My empirical tests have shown this to be true. I'm using SQLite ...

Copying BLOB values between databases with pure SQL in SQL Server

I need to pull some BLOB data from a SQL Server 2005 database and generate a SQL script to insert this same data in another database, in another server. I am only allowed to do this using SQL scripts, I can't use any other utility or write a program in Java or .NET to do it. The other big restriction I have is that I don't have access ...

Streaming and Linq Blobs

I have an object I am using to store document meta data into a table. The body text of the document can be very large, sometimes > 2GB so I will be storing it into a nvarchar(max) field in SQL 2008. I'll use SQL 2008 later to index that field. I won't be using filestreams because they are very restrictive to the database and prevents ...

How do I effectively find duplicate blob rows in MySQL?

I have a table of the form CREATE TABLE data { pk INT PRIMARY KEY AUTO_INCREMENT, dt BLOB }; It has about 160,000 rows and about 2GB of data in the blob column (avg. 14kb per blob). Another table has foreign keys into this table. Something like 3000 of the blobs are identical. So what I want is a query that will give me a re m...

Storing a small number of images: blob or fs?

I'm adding some functionality to my site so that users can upload their own profile pictures, so I was wondering about whether to store them in the database as a BLOB, or put them in the file system. I found a question similar to this here: Storing images in DB: Yea or Nay, but the answers given were geared more towards people expecting...

How do you insert binary data into a BLOB column with Class::DBI?

I want to create a new object using Class::DBI. One of the fields of this object is a BLOB type. I have a filehandle I want to use for this data, but apparently, just doing this doesn't work: my $item = My::Class::DBI::Class->insert({ foo => $bar, biz => $baz, blob => $my_filehandle ...