I am building a web app that manipulates fairly complex data: guitar tabs.
As a reference, guitar tabs look like this:
Eb|-------------------------------------------------------------------------|
Bb|-------------------------------------------------------------------------|
Gb|--5-5-5-5----------------------------------------------------------------|
Db|--5-5-5-5--3-3-3-3--7-7-7-7--5-5-5-5--2-2-2-2--3-3-3-3--2-2-2-2--5-5-5-5-|
Ab|--3-3-3-3--3-3-3-3--7-7-7-7--5-5-5-5--2-2-2-2--3-3-3-3--2-2-2-2--5-5-5-5-|
Eb|-----------1-1-1-1--5-5-5-5--3-3-3-3--0-0-0-0--1-1-1-1--0-0-0-0--3-3-3-3-|
Would it be more efficient for performance to store this data as a large chunk, or to break it up and store it on a "note by note" basis?
As a use case:
User changes first chord from: to:
Eb|--- Eb|---
Bb|--- Bb|---
Gb|--5 Gb|--4
Db|--5 Db|--4
Ab|--3 Ab|--2
Eb|--- Eb|---
If I store it as a block, the code to manipulate the tabs would have to be much more complex. If I store it note by note, the database will have to be accessed a lot more. Which method is more efficient? Potentially, a lot of users will be modifying the data. I want the best performing web app. I will be using MySQL if that affects the answer at all.