List:General Discussion« Previous MessageNext Message »
From:Kim Briggs Date:April 17 2005 4:23am
Subject:Re: Relative Numeric Values
View as plain text  

In reading through miscellaneous database design text on the web, I
read just the other day that you should not try to include meaningful
data in your key values.  I assume there will be some kind of "lookup"
tables for species, phylum, whatever.  Trying to make your key field
"smart" seems like way too much overhead and complexity.  I'm
wondering why, if the database is enormous, are you being so short and
cryptic with the "user-friendly" values?

my $.02

On 4/16/05, David Blomstrom <david_blomstrom@stripped> wrote:
> I think my question is more oriented towards PHP, but
> I'd like to ask it on this list, as I suspect the
> solution may involve MySQL.
> I'm about to start developing an enormous database
> focusing on the animal kingdom and want to find a key
> system more user friendly than the traditional
> scientific name.
> So imagine instead a page with the following in the
> head section:
> $AnimalID = 'canlup';
> This page displays information on the wolf, based on
> the first three letters of its genus and species name,
> Canis lupus.
> Now imagine a page with this value:
> $AnimalID = 'bal';
> This page displays information on the whale family
> Balaenidae. But what about the whale family
> Balaenopteridae, which begins with the same three
> letters?
> I could solve this problem by adding a numerical key
> to my database and displaying the following:
> $AnimalID = 'bal23';
> $AnimalID = 'bal24';
> The problem with this is that it makes it much harder
> to work with my data. When tweaking a page or writing
> a script, I can easily remember that bal = Balaenidae,
> but I can't possibly remember which numeral is
> associated with each mammal family. Also, what happens
> if I add or subtract rows from my database table, and
> the above values suddenly change to bal27 and bal28?
> So here's what I think I'd like to do:
> $AnimalID = 'canlup1';
> $AnimalID = 'bal1';
> $AnimalID = 'bal2';
> The page with canlup1 will display the FIRST (and
> only) instance of canlup in the database - the wolf.
> The page with bal1 will display the first instance of
> bal, which will always be Balaenidae, whether the
> absolute value is bal27 or bal2884. A page with bal2
> will always display the next mammal family that begins
> with bal, Balaenopteridae.
> So I THINK all I need to do is create a variable that
> reflects a particular value's ordinal position in a
> database...
> abc1
> abc2
> abc3, etc.
> Plus, I'll have to join two or three fields together
> to form a key; e.g. animals.species + animals.numerals
> Does anyone know how I can do this? Thanks.
> __________________________________
> Do you Yahoo!?
> Plan great trips with Yahoo! Travel: Now over 17,000 guides!
> --
> MySQL General Mailing List
> For list archives:
> To unsubscribe:
Relative Numeric ValuesDavid Blomstrom17 Apr
  • Re: Relative Numeric ValuesKim Briggs17 Apr
    • RE: Relative Numeric Valuesgunmuse17 Apr
  • Re: Relative Numeric ValuesPeter Brawley17 Apr
  • Re: Relative Numeric ValuesDan Bolser18 Apr
Re: Relative Numeric ValuesDavid Blomstrom17 Apr
  • Re: Relative Numeric ValuesDan Bolser18 Apr