Hi folx,
I've got a very generic design question. The situation: I need to store a large amount (~1000 per day) of combined texts in a database.
Combined text means every logical text"unit" consists of several independent parts, say "title, abstract, body". Another example would be "author, abstract, chapter 1, chapter 2, ..., chapter 10".
These textparts need to be stored in seperate BLOBs to be editable separately. It can savely be assumed that no logical text will consist of more than say 20 textparts, though the actual number of textparts will vary from text to text.
I have two possible database scenarios in mind:
1)
Store every textpart as unique dataset with a combined index on (logical textid, textpart number).
This would result in a narrow table with a lot of entries, resulting in many SELECTs to fetch a complete logical text.
2) Use one logical textid and 20 BLOBs to store every textpart of a logical textid in one dataset. Obviously this would result in a broad table with fewer datasets, leading to a fewer SELECTs to fetch a logical text but possibly a lot of overhead.
It can savely be assumed that SELECTs will make up almost all accesses to this table. Changing data will occur only rarely although about 1000 new logical texts need to be added every day (distributed, not all 1000 at a single time).
Now, what are the advantages/disadvantages of both scenarios? Maybe there is even another different and better solution? What would you suggest?
As always thanks in advance,
Dominique