Is it good practice to store a pickled object in mysql, size of object is around 10mb.
I have been reading up on storing a pickled object as a BLOB or charstr and know that it is possible. But while doing so I came across other articles for IMAGES that say: DON'T store images in mysql.
from: <
http://mysqldump.azundris.com/archives/36-Serving-Images-From-A-Database.html>
So I was wondering, if I have large python objects, should I store that in mysql or store URL path's to the objects? These objects need to be read and processed pretty frequently - but it is read only.
I also hope to use DJANGO to manage the creation of the database, though there does not need to be an API facing side for reading the pickled objects (the pickled object is necessary for backend processing and not information users sees.)
1 Answer 1
You can store blobs in the database - that's what the BLOB type is for, after all - but there's rarely a good reason to do so. Databases are best for structured and indexed data. If you just want to store an opaque blob then you should use the system that is best suited for that: the filesystem.