Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It is important that you have stated the purpose of your software will be to answer various questions about the book, including what characters appear on a given page.</p> <p>This tells us two things:</p> <ol> <li>You are seeking to model the physical layout of a particular edition of a book (since other wise the example question above would make no sense).</li> <li><p>Your design is going to be heavily influenced by the scope of the questions that need to be answered, as this will determine whether your system will:</p> <ul> <li>use data structures to pre-cache meta-data that will be required as answers (e.g. explicitly store a list of pages a character appears on),</li> <li>store the "raw data" (e.g. as a tree of novel > chapters > pages > text) which is then processed to answer a given question,</li> <li>some combination of both</li> </ul></li> </ol> <p>I suspect that a combination is likely to be right in your case, so your "raw data" will be represented in similar fashion to the first approach you mention:</p> <blockquote> <p>Make everything (Novel, Chapter, Page, Character) an object, and each of these objects has lists of references to other objects they contain / relate to"</p> </blockquote> <p>except that instances of <code>Page</code> would reference instances of <code>Text</code>, rather than <code>Character</code> which instead would become a meta-data class.</p> <p>Meta-data could be pre-cached, or generated on demand by trawling the raw data.</p> <p>Either way, you'll want to normalize your data model, </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload