A few questions:
1: How do I specify a string of indeterminate length in the pseudocode
at the bottom of this list? It will be a usability bug if I set
arbitrary limits on how long things can be?
Just don't specify a length with your String object.
2: What is the best way to store a list of strings as a field in a
database? (If need be I can have a delimiter-separated string, but I
want to know if there is a better method.)
You need a one-to-many join.
So you've got a sections table and you want a list of patterns to accept and one of patterns to deny, so you need a section_patterns_to_accept table that references sections and has a single text field. Same for _to_deny.
Clumsy, but at least SA can turn these into lists for you at the mapper level.
My pseudocode is below; I want to be able to access a pseudocode SQL
of "Select all documents [in the following section] containing 1 or
more occurrences of words X, Y, and Z and order them by date last
seen."
Well, if this is a toy app, your approach will be fine. Otherwise you'll probably want to use a database with built-in full text search like postgresql's tsearch2.
--
Jonathan Ellis
http://spyced.blogspot.com