Received: from icebox.venux.net (icebox.venux.net [216.120.166.10]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eASMS3t81052 for ; Tue, 28 Nov 2000 17:28:03 -0500 (EST) (envelope-from mitch@venux.net) Received: from windows (cx853045-b.phnx1.az.home.com [24.177.75.28]) by icebox.venux.net (Postfix) with SMTP id 1E7B52620B; Tue, 28 Nov 2000 17:40:22 -0500 (EST) Message-ID: <01a601c05993$94193b40$0200000a@windows> From: "Mitch Vincent" To: "Pgsql-Php" , "Chris" References: <00d101c0596c$0d339c00$0200000a@windows> <4.3.2.7.2.20001129085951.00b07d20@203.25.173.1> Subject: Re: Question re large objects Date: Tue, 28 Nov 2000 15:33:13 -0800 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Archive-Number: 200011/32 X-Sequence-Number: 40 Well, as I said before I really just don't like the idea of storing binary files or even large text files in a RDBMS (which was reinforced by my learning a little about large objects).. I have written several applications for the recruiting industry and have stored text resumes in the database (with a MS-Word doc counterpart as a flat-file) and found that works rather well. The only reason that I stored the resumes in the database was so I could search them with ease.. The tuple size being BLCKSZ hindered that a bit but I've been limping by with the BLCKSZ increased to 32k, oddly enough there is a thread on -HACKERS on why that might not be such a great idea. Regardless -- this tuple size problem will be squished with TOAST in 7.1 within the next few months. Binary files have a tendency to be much larger than ASCII text files and generally you're not going to perform any searching on them, at least not with SQL, so I'm left seeing only problems and overhead associated with storing binary files in the database... I'm sure there are some situations where storing them in the database might be the best option but I haven't run into that situation yet.. With the MS-Word resumes, I store them in a common directory (they can only have 1 in the application I'm speaking of ) and they're named with their ID, which is taken from the ID of the applicants record in the database. That's easy enough to do and it would be just a little more work to be able to store multiple resumes in the same directory for the same person as the ID is always unique (adding a -1 -2 etc to the filename would be a quick way to store multiples).. Just my opinion and as we've seen, I can be and often am --- wrong! :-) -Mitch ----- Original Message ----- From: "Chris" To: "Pgsql-Php" Sent: Tuesday, November 28, 2000 2:02 PM Subject: RE: [PHP] Question re large objects > I'm in the (slow) process of writing a tutorial for this sort of thing (ie > how to do it etc). > This has probably been discussed before, but I'm looking for some positives > & negatives for storing files in the database (I think you can use a switch > on dump which dumps EVERYTHING, but I could be wrong), and some positives & > negatives for outside the database in a seperate directory. > Can someone send me some pointers & experiences :) (It doesn't have to go > back to the list if no-one else is interested). > Thanks & Regards, > ------------------------ > Chris Smith > http://www.squiz.net > >