Reply to Re: One to Many Question

Your name:

Reply:


Posted by Ian B on 11/02/05 19:27

Not too easy to advise you when all you say is that you have 25 (or so)
fields of equipment like pumps and shakers, but...

from what you have said, I would be looking at

table :equip
equip_uid
equip_type_uid
equip_info

table: type
type_uid type_name

You add a type (say 1,"Pump")

and you add an equip (say 1,1,"Sludge")

from that, you know that the equip record is about a pump ( because its
equip_type_uid = 1 and you can look that up in the type table and find
that type_uid of 1 has a description of "Pump"

Your problem with multiple fields is that if you ever need to search,
you have 25 fields to look in, not one. This way, it is easy to search
(SELECT * FROM equip WHERE equip_info LIKE '%sludge%') and the type
table makes it easy to create dropdown boxes, search by category (no
misspelt "pmup") and you will probably save space, and if you rename
"Pump" to "Liquid Transfer Engines" you only have to do it in one place
(likewise, if you have a Spanish site, you only need another table
"type_es" with 1,Bombe" and all the equipment has Spanish categories.

Ian

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация