I was wondering what would be a better database design for long term
performance growth.

Design A:
               Data                         Mapping
Definitions
Three Tables:  Corporation ID  1 --> many   Corporation ID
               Corporation Data             Code ID         1 --> 1
Code ID
        
Code Definition

Each of these corporations has many code definitions and they are
searched by the code definition.

Select Definitions.definition from Data, Mapping, Definitions where
Data.ID = Mapping.ID and Mapping.CodeID = Definitions.CodeID and
Definitions.Definition LIKE "%Searchable Definition%";

Hence it looks like three table joins.


Design B:

Because each company has this list of Definitions, would it be better to
put these definitions using a programming language into a TEXT field
called definitions so that one could make a table like this, the TEXT
field would be a comma delimited list of Definitions.

Data
Corporation ID
Corporation Data
Definitions TEXT

And the select would like this:  Select * from data where Definitions
LIKE "%Searchable Definition%";

Any ideas.  A company has a maximum of 10-15 definitions usually just
one or two.  I know the table ceases to be relational, but could this
make it faster?

Also, another off topic question.  When I do explain on one of these
selects even with the definitions indexed it says no indices are used.
Does this have to do with the LIKE operator?

Thanks for any help,
Curtis

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to