Looking at your table structure means that while the actual row is small (many int values) there will be millions of rows.
Yes you can use a database of your choice, MySQL, Oracle, SQL Server, PostGres for the raw data from the cameras.
You can add partitioning by day which will create a partition for each day, and you may want to consider archiving data on an annual basis into a separate table for each year to make the table sizes manageable.
I would recommend that you setup another set of summary tables for reporting which can be based on the partitions, and this can be done on a daily basis (per partition) and automated.
The actual design of the summary tables depends on the reports you need to run, but it will be necessary so that your queries do not run off the base data table which will be huger.
The MySQL SET datatype is a disaster - as are any type of array datatypes (supported unfortunately by many RDBMSs). Check out my answer to another question here. As I note, MySQLs SET is a breach of Codd's second rule - no repeating group datatypes. It is also completely non-portable should you wish to change RDBMS.
If you wish to store that data this way is to have a BOOK table with book_id, name, author, country_of_publication, subject.... Then have a CHAPTER table with book_id, chapter_id, chapter_name, chapter_sub_subject.... and then a PAGE chapter with book_id, chapter_id, page_id, pager_number, ... images... other stuff... then LINE book_id, chapter_id, page_id, line_id, line_text...
This conforms to the relational model. I'm not clear on why you'd want to do this. What's wrong with TEXT datatype? Also, you might want to look into FTS (Full Text Search) - MySQL's native FTS (available on both MyISAM and InnoDB now). There's also Lucene, Sphinx and Spider (there may well be others - Google is your friend).
[EDIT in response to OP's comment]
I had the feeling it was wrong to make identically-structured tables
for each book
The whole point is that you should have identically structured tables for all books - you make the structure general enough to cope with (virtually) every possibility.
but I also though it would be slower to search through larger table
(containing ALL sentences not just 1book's worth) to (re)construct a
page, as well as doing an extra WHERE book_id = 'N' match...
Use indexes on book_id, chapter_id and maybe even page_id. Also, if you're going to be searching in your entire corpus for a particular word, then condsider Full Text Indexing.
Presumably this extra overhead is near-identical to me first sending
mysql to the single-book table. This leaves me with the query of how
to store a small array for use in PHP --- I'm leaning towards VARCHAR
with (un)serialize.
Be aware that the maximum size of VARHCHAR is 65535 bytes - some of James Joyce's sentences might go beyond that :-), but it's unlikely that even Joyce went beyond the 4GB of a TEXT datatype :-)
I Googled "storing books in MySQL" and came up with this which you may find of interest, and interestingly up popped this on the first page of the same search.
Best Answer
Note, that I assume C# (since this language is present in tags) and Entity Framework.
Both approaches assumes, that entity types are inherited from abstract, non-persistent base entity type, which accumulates 75% of fields, so the code base discussion is not relevant.
Pros of Table-Per-Hierarchy (all descendants are stored in single table):
join
s to select descendant's row)Cons of Table-Per-Hierarchy:
Id
andName
-like fields (Title
,Header
, etc). Are you going to store all of them, using single table?IMHO, every inheritance scheme, mapped to a relational database, should be used very carefully. Definitely you shouldn't map all you entities to a single table.