How to store the lyrics?

Let's say I need to store the lyrics. I guess so:

- id
- author_id

- id
- text_id
- text

Please note, the text is not stored in the table text only versions. When you create a new text create a new version and text stay there. The correct move?
June 7th 19 at 14:31
4 answers
June 7th 19 at 14:33
Can versioning be organized based on one table, just add a field to a table with a timestamp. If you change just add a new entry with a new timestamp. To select the current record, select the record with the highest timestamp. Easy interface to view changes, etc.
To remove, you need to have status field where will be written the tag to delete physically the records are not delete.
Similar to the schema of the tables with history repeatedly seen in the banking software.
June 7th 19 at 14:35
The patches can be stored. If the texts are large and a lot of them, the place will be consumed more economically. But to restore the full text of a particular version in this case you need to patch the source version of the desired number of times.
June 7th 19 at 14:37
June 7th 19 at 14:39
You can put a trigger on event edit,add,delete, to not programming all biznesowych. Of trigger, you can write, at least in the next column, at least in the next table.

Find more questions by tags Database designMySQLWeb Development