List:MySQL++« Previous MessageNext Message »
From:Warren Young Date:January 9 2007 12:47pm
Subject:Re: inserting a vector into a MySQL blob field
View as plain text  
Daniel Thorpe wrote:
> 
> I'm trying to store a vector of doubles into a blob field in a mysql 
> database, 

Why?  SQL databases already have a structure made for storing lists of 
numbers.  They're called columns.

A database is not a filesystem, as Microsoft has spent a lot of money 
proving.  (WinFS)  A database is for storing structured data, whereas a 
filesystem is made for storing arbitrary data.  By dropping an array of 
data into a single field as a BLOB, you are stripping that structure 
from it.  If you don't want the structure, store it in a file, and put a 
reference to the filename in the database.

If I have not managed to convince you to rethink your design, search the 
list archives for Chris Frey's packarray template.  It is not supported, 
but it may work for you.
Thread
inserting a vector into a MySQL blob fieldDaniel Thorpe7 Jan
  • Re: inserting a vector into a MySQL blob fieldMichael Hanselmann7 Jan
    • Re: inserting a vector into a MySQL blob fieldBill K9 Jan
  • Re: inserting a vector into a MySQL blob fieldWarren Young9 Jan