Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 0C7EA2E15CD for ; Mon, 17 Mar 2008 15:52:04 -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 24252-01-8 for ; Mon, 17 Mar 2008 15:51:45 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.5 Received: from ti-out-0910.google.com (ti-out-0910.google.com [209.85.142.187]) by postgresql.org (Postfix) with ESMTP id A1E6C2E3565 for ; Mon, 17 Mar 2008 15:40:12 -0300 (ADT) Received: by ti-out-0910.google.com with SMTP id y6so1984771tia.5 for ; Mon, 17 Mar 2008 11:40:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=Oyg50pDnM5Too8wK1TTJm88WYH75XHor9L6JCWdrPX0=; b=pNDrJ+K7e2ToqccUmSi5xhi8kj+83OpjLMGHy1ZSCbLQOMRqDtg338jWPL1njsGgc3QTrzd1FOl0Of96mgZ6zuYhkyfZ+KzXWbmOyPzOHx1pQieja0M1kcQyayfIJn5jURzSX0EyTgX0Z7AEVKh75FxMMtycAmDCrrCZIkOh+AQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gpVXvLos35TfLJLqi3ytsdu6SYica1hTbDPqMFd2ifmtnYAWBkJKbLk1eN30rObDtClxpS01QUrTbvU6Na/2hjJbkdOwb4RhxQB4TjlUm9q5DKjhMlhFN129I+RGDlPFiH7+ydXKYP38Ummn/0PzIdQcINal2s+kce0mLowCfaE= Received: by 10.150.12.5 with SMTP id 5mr318867ybl.128.1205779205693; Mon, 17 Mar 2008 11:40:05 -0700 (PDT) Received: by 10.150.200.3 with HTTP; Mon, 17 Mar 2008 11:40:05 -0700 (PDT) Message-ID: <8fb205ea0803171140q3167aca9j190e192a40ef911d@mail.gmail.com> Date: Mon, 17 Mar 2008 14:40:05 -0400 From: Rich To: "Craig Ringer" Subject: Re: What is the best way to storage music files in Postgresql Cc: pgsql-performance@postgresql.org In-Reply-To: <47DCBD63.9050109@postnewspapers.com.au> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <8fb205ea0803152311n2c950758g253f4cefd20cff7d@mail.gmail.com> <47DCBD63.9050109@postnewspapers.com.au> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200803/356 X-Sequence-Number: 29310 On Sun, Mar 16, 2008 at 2:25 AM, Craig Ringer wrote: > 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. What costs are to speaking of? > > 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 > >