Reputation: 3600
Disclaimer: let me know if this question is better suited for serverfault.com
I want to store information on music, specifically:
This information will be used in a web application, and I want people to be able to see all of the songs associated to an album, and albums associated to an artist, and artists associated to a genre.
I'm currently using MySQL, but before I make a decision to switch I want to know:
Upvotes: 3
Views: 348
Reputation: 6805
This kind of information is ideally suited to document databases. As with much real-world data, it is not inherently relational, so shoe-horning it into a relational schema will bring headaches down the line (even using an ORM - I speak from experience). Ubuntu already uses CouchDB for storing music metadata, as well as other things, in their One product.
Taking the remainder of your questions one-by-one:
null
value, which are many and varied. Were you to decide you wanted to store the song file itself along with the metadata, you could do that too in CouchDB, by supplying the song file as an attachment to the document; further more, you wouldn't have any schema inconsistencies as a result of doing this, because there is no schema!
I hope I haven't made too many missteps here; I'm quite new to document DBs myself.
Upvotes: 2
Reputation: 481
Your data seems ideal for document oriented databases.
Document example:
{
"type":"Album",
"artist":"ArtistName",
"album_name":"AlbumName",
"songs" : [
{"title":"SongTitle","duration":4.5}
],
"genres":["rock","indie"]
}
And replication is one of couchDB coolest features ( http://blog.couch.io/post/468392274/whats-new-in-apache-couchdb-0-11-part-three-new )
You might also wanna take a look at Riak.
Upvotes: 3