Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 91D172E2E86 for ; Sun, 16 Mar 2008 03:25:56 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 61290-02 for ; Sun, 16 Mar 2008 03:25:52 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from www.postnewspapers.com.au (www.postnewspapers.com.au [202.61.230.242]) by postgresql.org (Postfix) with ESMTP id 863B02E2E78 for ; Sun, 16 Mar 2008 03:25:52 -0300 (ADT) Received: from mail.postnewspapers.com.au (202-89-185-120.static.dsl.amnet.net.au [202.89.185.120]) by www.postnewspapers.com.au (Postfix) with ESMTP id 13F91C2B5; Sun, 16 Mar 2008 15:25:45 +0900 (WST) Received: from localhost (access [127.0.0.1]) by mail.postnewspapers.com.au (Postfix) with ESMTP id EA6061E0435; Sun, 16 Mar 2008 15:25:44 +0900 (WST) X-Virus-Scanned: Debian amavisd-new at postnewspapers.com.au Received: from mail.postnewspapers.com.au ([127.0.0.1]) by localhost (access.postnewspapers.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id K7MK0WnOuHVa; Sun, 16 Mar 2008 15:25:42 +0900 (WST) Received: from [203.161.97.213] (203.161.97.213.static.amnet.net.au [203.161.97.213]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "Craig Ringer", Issuer "POST Certificate Authority" (verified OK)) by mail.postnewspapers.com.au (Postfix) with ESMTP id 3C5DB1E0434; Sun, 16 Mar 2008 15:25:42 +0900 (WST) Message-ID: <47DCBD63.9050109@postnewspapers.com.au> Date: Sun, 16 Mar 2008 15:25:39 +0900 From: Craig Ringer User-Agent: Thunderbird 2.0.0.12 (Windows/20080213) MIME-Version: 1.0 To: Rich Cc: pgsql-performance@postgresql.org Subject: Re: What is the best way to storage music files in Postgresql References: <8fb205ea0803152311n2c950758g253f4cefd20cff7d@mail.gmail.com> In-Reply-To: <8fb205ea0803152311n2c950758g253f4cefd20cff7d@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/332 X-Sequence-Number: 29286 Rich wrote: > I am going to embarkon building a music library using apache, > postgresql and php. What is the best way to store the music files? Your options are either to use a BLOB within the database or to store paths to normal files in the file system in the database. I suspect using normal files will make backup and management a great deal easier than using in-database BLOBs, so personally I'd do it that way. Storing the audio files in the database does make it easier to keep the database and file system backups in sync, but I'm not really sure that's worth the costs. I'm sure that what you're doing has been done many times before, though, so even if you're not going to use one of the existing options you might at least want to have a look at how they work. > Which file type should I use? I'm not sure I understand this question. Are you asking which audio compression codec and audio container file type (like "mp3", "aac", etc) you should use? If so, this is really not the right place to ask that. Do you mean which file /system/ ? -- Craig Ringer