views:

33

answers:

1

I need to store a large string that represents music notation in text format. This string could be anywhere between a few lines to several hundred.

I need to store meta data about the string (eg artist, instrument etc) in a database.

I'm wondering, would it be better to store the large text string in a flat file or in the database?

I think if I store it in the database it might be easier to monitor concurrency issues etc... but then in a flat file it would be easier to scale.

+2  A: 

If you're already storing the metadata about the music in a database, then just store the string representation alongside it.

That way all your information is in a single place and you won't have to worry about retrieving data from two locations when a user wants to fetch it.

Justin Niessner
Yeah, I'm currently thinking that makes more sense - but if it's going to have a lot of implications further down the line managing the data then I may as well prepare for it now. Thanks for your answer :-)
Matt