Let's say I need to store the text of a series of books, line per line in a database, and present them in a (CMS-based) website. I thought the correct setup would be:
- a 'library' table: containing the ISBN-type info (per book-ID: author, title, year, maybe blurb) plus an array with the empty pages of that book.
- a 'lines-of-text' table for each book.
The 'array' question here is different from the 'Storing integers for efficient select' and various similar questions (like 'match elements to dates of week') in that the set of (integer) options is not limited... it's sparse in a large and unbounded range AND because the entire use is not within SQL, but within PHP.
I now have my doubts:  Should I put all the book-lines-tables together in one single table (adding a column containing the book-ID)? Or does it not matter really? There's cleanliness/readability, there's performance (once you've chosen a 'book', you're not going to switch --- so you'd be searching in a smaller table if there is many, is my idea). [Further info: I have to add (and occasionally delete) books. I also need to assign an owner to each book (that can edit the 'lines'), but that is outside the scope of Mysql I think.]
 How should I save the 'empty pages' array of each book? --a Convert a php array to string (serialize/unserialize) and store as varchar (or tinytext)? Or --b Make another table of books:empty-pages matches? Or --c Use SET('1','2','3', ..., '999') to foresee all possible empty pages [and swear/blaspheme/explode violently the day I have to add a 1001-page-long book with an empty 1000th page]? Or --d Calculate on-the-fly from the database?
I guess the 'SET'-approach protects against impossible arrays, from badly-intentioned 'owners' of books (which is rather improbable in my specific case); but sparse it's a lot of overhead and can easily break by extra-long entry. I guess on-the-fly is needlessly slow as it's an unchanging list (calculate once per 'book', not once every 'page'-request!). I have the feeling solution (a) is the best given the circumstance, as I then put it in PHP which will be what's used to create the whole structure and linking (in HTML).