[thelist] media/image management
Steve Lewis
nepolon at worlddomination.net
Mon Jun 30 14:32:34 CDT 2003
Chris W. Parker wrote:
> The type will probably be defined in a separate table so that it can
> be administered via a web page. The different types I've come up with
> so far are:
>
> 0 = thumbnail
> 1 = small graphic
> 2 = medium graphic
> 3 = large graphic
> 4 = video (likely just mpg/avi)
> 5 = 360 degree rotation animation
> 6 = sound (mp3)
>
>
It occurs to me that you might be better off storing the MIME type
instead. MIME types are meaningful outside the context of the database
and would likely be a good idea to record even if you do not forsee a
need for it at this time. It is useful to store a filename for the item
in your media table regardless of whether or not the actual media item
is in the database or on the filesystem because then you can provide a
meaningful/traditional filename to users who wish to download the item.
You would generally do well under most DB management systems to store
the binary data in a separate table if you are storing them in the
database for performance reasons. In that case, you would probably be
well served by making two columns for the media_binary table: an ID
which is a foreign_key (no need for an auto-incremented key) to the
media table described above that stores information about the media
item, and a binary/blob/whatever (huge binary safe) field type you use
in your DB.
Steve
More information about the thelist
mailing list