pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Rich <rhdyes@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: What is the best way to storage music files in Postgresql
Date: Sun, 16 Mar 2008 15:25:39 +0900
Message-ID: <47DCBD63.9050109@postnewspapers.com.au> (raw)
In-Reply-To: <8fb205ea0803152311n2c950758g253f4cefd20cff7d@mail.gmail.com>
References: <8fb205ea0803152311n2c950758g253f4cefd20cff7d@mail.gmail.com>

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




view thread (21+ messages)  latest in thread

Message-ID: <47DCBD63.9050109@postnewspapers.com.au>
Permalink:  ../47DCBD63.9050109@postnewspapers.com.au/
Also on:    postgresql.org/message-id/47DCBD63.9050109@postnewspapers.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: craig@postnewspapers.com.au, rhdyes@gmail.com
  Subject: Re: What is the best way to storage music files in Postgresql
  In-Reply-To: <47DCBD63.9050109@postnewspapers.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox