SQL

Brian Cluff brian@snaptek.com
Wed, 10 May 2000 23:49:31 -0700


Having never used postgres I cant really speak too much, but having worked
on an open source project involving it, my opinion of it was that it has
quite a lot of weirdnesses in the way that it does SQL that are just
non-standard.  We were having to write alot of... do the SQL this way for
ever database, unless its postgress then do it this way.
Ive found that with MySQL it tends to be fairly standard.  You just have
missing sections that are not put in so that the database is faster...  In
otherwords, if you dont intend to do anything with your database that
involves using transactions, then I would go with MySQL.  If you can't live
without them, then go with some other database.  Personally, I have built
dozens of websites and have never needed transactions myself.  That of
course could change, but there are ways around it too.

> When I wanted to insert pictures into Nettebook, I investigated and
> found that there was no way with PHP to extract an image from a BLOB
> and pass it on to the web browser directly; it would have to write it
> to the filesystem first.  So I figured what's the point, managing multiple
> temp files and figuring out when it's OK to delete them would be more
> work than just using files for the pictures in the first place.

AFAIK, it is VERY possible to put the images in the database and have PHP
send them out.  You just have to use header() to let the browser know that
its goning to be recieveing a gif/jpg/png...etc etc  instead of text/html.
If you dont, you just end up getting a bunch of raw unformatted garbage that
would be the image.
of course ive never dont it myself. I tend to prefer to put them on the file
system and then just put the link in the database with a quick check to see
if they are actually there before inserting them into a document (so that
you dont get a dead link).

Brian Cluff