On 3/26/06, Jonathan Ellis <[EMAIL PROTECTED]> wrote:
Thanks.
Ok, as dealt with in the "Basic Data Mapping" section?
Does Mysql have this search? The usage I illustrated above is a stable usage pattern (I'm not designing something from scratch, but trying to retrofit an existing application with custom database for better performance.
On 3/25/06, Jonathan Hayward http://JonathansCorner.com <[EMAIL PROTECTED] > wrote: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.
Thanks.
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.
Ok, as dealt with in the "Basic Data Mapping" section?
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.
Does Mysql have this search? The usage I illustrated above is a stable usage pattern (I'm not designing something from scratch, but trying to retrofit an existing application with custom database for better performance.
--
Jonathan Ellis
http://spyced.blogspot.com
--
++ Jonathan Hayward, [EMAIL PROTECTED]
** To see an award-winning website with stories, essays, artwork,
** games, and a four-dimensional maze, why not visit my home page?
** All of this is waiting for you at http://JonathansCorner.com
** If you'd like a Google Mail ( gmail.com) account, please tell me!