[thelist] Database design question

rudy r937 at interlog.com
Sun Oct 6 12:51:01 CDT 2002

> From a db design standpoint, does this make sense?

yes, it does

> in fact they are slightly different -- one field deals with the *primary*
> (dominant) breed of an animal, the other with the *secondary* breed.

very straightforward

> I'm wondering if I'm missing something from
> a design/scalability/performance standpoint.

as you said, the app does not allow for tertiary breeds

your design is simple, and performs well

normalization fanatics might suggest a separate table for an animal's

don't listen to them

to give you something to compare to, i have a table which has two links to
the same second table, requiring a double join to resolve the names

    select games.gameno
         , games.vteam
         , away.teamcity   as visitor
         , games.spread
         , games.hteam
         , home.teamcity   as hometeam
      from games
      join teams as away
        on games.vteam = away.teamabbr
      join teams as home
        on games.hteam = home.teamabbr

the foreign keys vteam and hteam have values like NYJ which link to the
teams table primary key teamabbr, while teamcity has values like "New York
Jest"  (J-E-S-T, Jest, Jest, Jest!)


More information about the thelist mailing list