[thelist] function_id

rudy r937 at interlog.com
Sun Feb 16 14:06:01 CST 2003


>  Then you could "F123" for a foxhunter or "H123" for a hunter. "

not sure which guru you got that from, because a real database guru would
never suggest anything like that

;o)

the structure you may want to use for your categories is a hierarchy or tree

create table categories
 ( catid  integer  not null  primary key
 , catname  varchar(100)  not null
 , parentcat  integer  null
 , foreign key (parentcat) references categories
 )

if each sportsman, er, sportsperson can belong to only one category, then

create table sportspeople
 ( personid  integer not null  primary key
 , personname  varchar(100)  not null
 , personcat  integer  null
 , foreign key (personcat) references categories
 )

sample categories
 103  hunters  --
 104  fishers  --
 106  foxhunters  103
 107  trawlers  104
 108  wabbithunters  103

sample sportspeople
 502  prince charles  106
 504  fontsize troll  107
 505  elmer fudd  108


rudy




More information about the thelist mailing list