13 messages in com.mysql.lists.win32Re: Storing Binary Content| From | Sent On | Attachments |
|---|---|---|
| Alain Fontaine | 25 Oct 1999 12:56 | |
| Brian Andrews | 25 Oct 1999 13:01 | |
| William Kerber | 25 Oct 1999 20:13 | |
| William Kerber | 25 Oct 1999 20:14 | |
| Tonu Samuel | 25 Oct 1999 21:50 | |
| Tonu Samuel | 25 Oct 1999 21:52 | |
| Tim Endres | 25 Oct 1999 21:55 | |
| Tonu Samuel | 25 Oct 1999 22:03 | |
| Tim Endres | 25 Oct 1999 22:20 | |
| Bob Kline | 26 Oct 1999 02:59 | |
| Bob Kline | 26 Oct 1999 03:02 | |
| Sinisa Milivojevic | 26 Oct 1999 04:28 | |
| Michael Widenius | 13 Nov 1999 03:59 |
| Subject: | Re: Storing Binary Content![]() |
|---|---|
| From: | Tim Endres (ti...@ice.com) |
| Date: | 10/25/1999 10:20:05 PM |
| List: | com.mysql.lists.win32 |
I beg to differ on this point. There are good reasons to want to place your media, or other substantial binary data, in the database. As far
What the reasons are?
The most obvious is to eliminate a dependency on a local file system. If you ever need to move to another host, with a potentially different file system layout, or worse, different path syntax, you will need to rebuild the paths in your database.
In my case, I have media coming in that I have to store. If I had to invent file names for the incoming data, write the file, store the name in the database, it would not be as convenient as simply dropping the media into the DB with autoincrementing of the int ID.
Another convenience is that all data access occurs in SQL. Thus, when I wish to construct an HTML page, I can grab the HTML, and images in one SQL query, then feed the page down. This is more significant given that the SQL and WWW hosts are different.
Another, seemingly silly, reason to prefer the table to the file system is the clustering cost on some lesser operating systems. The waste that can occur with many small binary images can add up. The table eliminates most of the waste.
On the DOWN side, you can easily and quickly run into file size limits. For instance, Linux limits you to 2GB files currently, which means that your tables are limited to 2GB, which means storing MPEG movies in a table is probably a bad idea. It also means that a single table would also make a bad image library. Plus, it is sometimes VERY convenient to have your media on the local disk for easy viewing and modification.
Nuances, I will grant you.
tim. Tim Endres - ti...@ice.com ICE Engineering, Inc. - http://www.ice.com/ "USENET - a slow moving self parody." - Peter Honeyman




