[thelist] PHP/MSQL question millions or thousands

Matt Warden mwarden at gmail.com
Wed Feb 6 11:09:51 CST 2008


On 2/6/08, Mark A. MacInnes <mark.macinnes at awakeanddreaming.net> wrote:
> I would definitely put each ingredient into a separate entry. Initially it
> might seem easier to put them all in one field, but having them in one field
> isn't flexible, would make listing recipes by ingredients a pain, would make
> matching recipes to combinations of ingredients a pain, and I would find
> plain messy.
>
> There is much, much more power having the ingredients as separate entries.

What about Google Recipe search[1]? I'm leaning toward Mac's
suggestion of generating tags from the full text recipe content.
Perhaps it is my weak UI design skills, but it is hard to think of an
interface where creating a recipe would be refreshingly simple given
such a database design, especially when I start thinking about how a
qty, unit, preparation style, brand name, etc. would all be valid
variations of the same ingredient.

Some things you'll have to deal with:

Salt – to taste
Generous pinch of salt
Red Chili Powder – to taste, optional
1/4 medium Onion, finely chopped
Lemon OR Lime Juice – 1/2 tsp
Cilantro – 5 springs, finely chopped
Papads – 2, any flavor
1/2 lb. thin bacon chopped

It would be tough to handle all this in a non-painful way on the UI
side if you had a rigid database structure like that, I would think.

I would say keep the recipe stored in a flexible manner, impose some
kind of general, non-prohibitive format from the UI side, and then
"data mine" the text in the recipe for tags.

[1] http://www.google.com/base/s2?a_n0=recipes&a_y0=9&hl=en&gl=US

-- 
Matt Warden
Cincinnati, OH, USA
http://mattwarden.com


This email proudly and graciously contributes to entropy.


More information about the thelist mailing list