X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id C6C229DCBD3 for ; Thu, 9 Feb 2006 15:26:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 17883-01 for ; Thu, 9 Feb 2006 15:26:38 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from noel.decibel.org (noel.decibel.org [67.100.216.10]) by postgresql.org (Postfix) with ESMTP id 26FE59DCBE3 for ; Thu, 9 Feb 2006 15:26:36 -0400 (AST) Received: by noel.decibel.org (Postfix, from userid 1001) id 2D47739850; Thu, 9 Feb 2006 19:26:22 +0000 (UTC) Received: (hashcash-sendmail, from uid 1001); Thu, 9 Feb 2006 13:26:21 -0600 Date: Thu, 9 Feb 2006 13:26:21 -0600 From: "Jim C. Nasby" To: "Craig A. James" Cc: Nate Byrnes , pgsql-performance@postgresql.org Subject: Re: Storing Digital Video Message-ID: <20060209192621.GU57845@pervasive.com> References: <3cf983d0601311632t4a2f068au1f958746c2b092a7@mail.gmail.com> <200602060930.31144.albert@sedifa.com> <43EB475C.3040708@qabal.org> <43EB5D59.1030207@modgraph-usa.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <43EB5D59.1030207@modgraph-usa.com> X-Operating-System: FreeBSD 6.0-RELEASE amd64 X-Distributed: Join the Effort! http://www.distributed.net User-Agent: Mutt/1.5.11 X-Hashcash: 1:20:060209:cjames@modgraph-usa.com::5l7zNcQKyoKr6Lwd:00000000000000 0000000000000000000000002AUS X-Hashcash: 1:20:060209:nate@qabal.org::GnB1BFH93v0d+h2d:000045a X-Hashcash: 1:20:060209:pgsql-performance@postgresql.org::xnn9aQ39yrl2aZ7N:00000 0000000000000000000000001xwA X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.104 required=5 tests=[AWL=0.104] X-Spam-Score: 0.104 X-Spam-Level: X-Archive-Number: 200602/81 X-Sequence-Number: 17067 On Thu, Feb 09, 2006 at 07:18:49AM -0800, Craig A. James wrote: > Nate Byrnes wrote: > >I must claim some ignorance, I come from the application world... but, > >from a data integrity perspective, it makes a whole lot of sense to > >store video, images, documents, whatever in the database rather than on > >the file system external to it. Personally, I would use LOB's, but I do > >not know the internals well enough to say LOBs or large columns. > >Regardless, there are a lot of compelling reasons ranging from software > >maintenance, disk management, data access control, single security layer > >implementation, and so on which justify storing data like this in the > >DB. Am I too much of an Oracle guy? > > Yes, you are too much of an Oracle guy ;-). Oracle got this notion that > they could conquer the world, that EVERYTHING should be in an Oracle > database. I think they even built a SAMBA file system on top of Oracle. > It's like a hammer manufacturer telling you the hammer is also good for > screws and for gluing. It just ain't so. > > You can store videos in a database, but there will be a price. You're > asking the database to do something that the file system is already > exceptionally good at: store big files. > > You make one good point about security: A database can provide a single > point of access control. Storing the videos externally requires a second > mechanism. That's not necessarily bad -- you probably have a middleware > layer, which can ensure that it won't deliver the goods unless the user has > successfully connected to the database. You're forgetting about cleanup and transactions. If you store outside the database you either have to write some kind of garbage collector, or you add a trigger to delete the file on disk when the row in the database pointing at it is deleted and hope that the transaction doesn't rollback. Of course, someone could probably write some stand-alone code that would handle all of this in a generic way... :) -- Jim C. Nasby, Sr. Engineering Consultant jnasby@pervasive.com Pervasive Software http://pervasive.com work: 512-231-6117 vcard: http://jim.nasby.net/pervasive.vcf cell: 512-569-9461