FacebookTwitter
Hatrack River Forum   
my profile login | search | faq | forum home

  next oldest topic   next newest topic
» Hatrack River Forum » Active Forums » Books, Films, Food and Culture » fugu: I've sketched out a data design for the recipe site

   
Author Topic: fugu: I've sketched out a data design for the recipe site
Dagonee
Member
Member # 5818

 - posted      Profile for Dagonee           Edit/Delete Post 
Of course, anyone else is welcome to comment as well.
Here's the ERD.

The group and user tables are part of mambo. The cookbook table is really just to allow different recipe sets with different user rights. I intend to only use one cookbook at the site.

Viewing rights will be assigned based on mambo groups by cookbook. This is limited, but will suffice until the next version of Mambo comes out.

Editing rights will be defined as follows:
Submit recipes (which also allows editing of recipes submitted by the user).
Edit recipes (which allows editing of any user's recipes).
Admin - basically a God mode, which will ultimately be used to manage the back end.

Navigation will be through groups and categories.

A group would be nationality, for example, and choices might be American, Tex-Mex, Mexican, Chinese, French, Italian, etc. Each group will have the option to allow only 1 choice or multiple choices.

Each recipe can be categorized in as many groups as desired: Type of Dish, Nationality, Main Ingredient, etc. I envision a simple checkbox or radio button schema to allow selection of all categories on one screen.

Browsing will be through groups, then categories. It could span multiple cookbooks (assuming the user has rights to multiple cookbooks). Ordering can be assigned to any group, category, or recipe. Sorting will be based first on ordering, then on title.

I can admin this from the back end, so to start I'm just going to work on a front end to browse and add/edit recipes.

Any thoughts or suggestions?

Dagonee

Posts: 26071 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
Farmgirl
Member
Member # 5567

 - posted      Profile for Farmgirl   Email Farmgirl         Edit/Delete Post 
Do you want ratings? I mean, for each recipe, if someone (besides the author) tries it and realy likes it, can they give it good feedback?

FG

Posts: 9538 | Registered: Aug 2003  |  IP: Logged | Report this post to a Moderator
Dagonee
Member
Member # 5818

 - posted      Profile for Dagonee           Edit/Delete Post 
That's a good idea. I think I'll hold that for version two.

I will have the ability to discuss each recipe in the forum, so some kind of feedback will be available in version 1.

Dagonee

Posts: 26071 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
Lyrhawn
Member
Member # 7039

 - posted      Profile for Lyrhawn   Email Lyrhawn         Edit/Delete Post 
Dag-

You asked somewhere on another thread about what made it seem like you were a woman?

A recipe website? [Smile]

(I'm just kidding, I cook a lot, and variety is always good)

Posts: 21898 | Registered: Nov 2004  |  IP: Logged | Report this post to a Moderator
Dagonee
Member
Member # 5818

 - posted      Profile for Dagonee           Edit/Delete Post 
Yeah, yeah, yeah.

When you cook, you get to use sharp things and play with fire. You get to cut up animals and use really cool gadgets.

Whoever said cooking was a girlie task doesn't know how to have fun. [Big Grin]

Dagonee

Posts: 26071 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
MrSquicky
Member
Member # 1802

 - posted      Profile for MrSquicky   Email MrSquicky         Edit/Delete Post 
I'd suggest creating a separate ingredients table and using a linking table between ingredient and recipe along with amount. That'd give you and your users a lot more control over things like ingredient searches edit: and possible substitutions.

Oh and in the recipecategory table diagram, you've got your unique index 1 displayed twice. Maybe that just has a meaning I'm not familiar with.

Other than that, looks like a clean design to me.

[ January 13, 2005, 03:56 PM: Message edited by: MrSquicky ]

Posts: 10177 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
Dagonee
Member
Member # 5818

 - posted      Profile for Dagonee           Edit/Delete Post 
Edit: To adam:

This is news?

[ January 13, 2005, 03:52 PM: Message edited by: Dagonee ]

Posts: 26071 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
Dagonee
Member
Member # 5818

 - posted      Profile for Dagonee           Edit/Delete Post 
quote:
I'd suggest creating a separate ingredients table and using a linking table between ingredient and recipe along with amount. That'd give you and your users a lot more control over things like ingredient searches.
I thought of that - it was my first inclination, in fact. It would certainly help with adjusting recipes (changing 4 servings to 6, etc.). It would also make formatting a little easier, I think.

As for searching, I'm not sure how much it helps, because we've pretty much got to use some kind of full-text searching anyway. Unless, of course, I made an ingredients table and an ingredients to recipe linking table (which would have the measurements). The payoff there would be huge, but the complexity whenever a user needs to add an ingredient not in the DB is very high.

The downsides are in UI complexity/usability trade offs and initial development time. If I was developing this back at my company, I'd insist on it.

What do people think: how useful is a scale up/scale down feature?

quote:
Oh and in the recipecategory table diagram, you've got your unique index 1 displayed twice. Maybe that just has a meaning I'm not familiar with.
That's an artifact of Visio using an Access driver to make an ERD for a MySQL database. The little abbreviations next to the field names can be ignored - the important thing is that the PK fields are above the line, the other fields below.

Thanks for the input.

Dagonee

Posts: 26071 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
Dagonee
Member
Member # 5818

 - posted      Profile for Dagonee           Edit/Delete Post 
quote:
What I'd really like to see is a context-free way of describing instructions, so the computer could actually parse recipies.
Oh, some kind of symbolic language. Each container would accept input (1/3 cup flour, 1 tsp. baking powder, etc.) and a combination method (fold, stir, whisk) or an operation (bake at 325, simmer, boil, cool) and a time limit.

Each could be defined and then recipes could be meaningfully constructed. It'd be step 1 to making a cooking robot!

Dagonee

Posts: 26071 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
MrSquicky
Member
Member # 1802

 - posted      Profile for MrSquicky   Email MrSquicky         Edit/Delete Post 
Jeez, I didn't even thinking of the scaling issue. I'd do it, although you're right about the increased overhead with people adding new ingredients. I don't actually think it'd be that big a deal though, unless you were going to enforce stricter duplication constraints than I think you need. Just get the people to enter the ingredients in a list instead of a textbox, do an exact lookup and if you don't get a match insert it.

adam,
All you need to do to link the ingredients to the recipes is to have a lining table with recipe_ID, ingredient_ID, number, and measurement (e.g. tsp. or cup or whatever).

Posts: 10177 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
Dagonee
Member
Member # 5818

 - posted      Profile for Dagonee           Edit/Delete Post 
That's true - I've written cleanup routines before for similar situations that automatically replace all references to "buttr" with butter.

What I really hate is the UI - you have to start with some number of ingredients, and have a button to increase it. It's just tacky to my UI sensibilities. Sometimes I miss fat clients.

A drop down list of ingredients would be cool, too, but that really gets difficult to manage on the web once the list gets long.

This might depend on if i can get some help.

Dagonee

Posts: 26071 | Registered: Oct 2003  |  IP: Logged | Report this post to a Moderator
MrSquicky
Member
Member # 1802

 - posted      Profile for MrSquicky   Email MrSquicky         Edit/Delete Post 
If you're willing to countenance some extra work on the backend side, you could still do this with people entering the ingredients into a text box. You'd have to make sure that they followed some sort of standard and then you could extract the relevant information.

If it's going to look like:

1 cup sugar
1 tsp. salt

it should be too hard to write like a regular expression that could match the possibilities. The big problem there is how do you handle things were it doesn't parse correctly.

Posts: 10177 | Registered: Apr 2001  |  IP: Logged | Report this post to a Moderator
Space Opera
Member
Member # 6504

 - posted      Profile for Space Opera   Email Space Opera         Edit/Delete Post 
"You get to cut up animals..." [No No]

Dag, Dag, Dag, when will you see the light?

space opera

Posts: 2578 | Registered: Apr 2004  |  IP: Logged | Report this post to a Moderator
HollowEarth
Member
Member # 2586

 - posted      Profile for HollowEarth   Email HollowEarth         Edit/Delete Post 
You can always use js to to a sort of type ahead find. Its pretty slick, and really beats a drop down.
Posts: 1621 | Registered: Oct 2001  |  IP: Logged | Report this post to a Moderator
Lyrhawn
Member
Member # 7039

 - posted      Profile for Lyrhawn   Email Lyrhawn         Edit/Delete Post 
I work in a kitchen, it IS fun. I got to use the big heavy duty mixer thing last week. It's like playing with power tools.

And as a side note, it's very confusing to read a thread when adam posts anywhere, because my real name is Adam, and I always think someone is addressing me.

Posts: 21898 | Registered: Nov 2004  |  IP: Logged | Report this post to a Moderator
   

   Close Topic   Feature Topic   Move Topic   Delete Topic next oldest topic   next newest topic
 - Printer-friendly view of this topic
Hop To:


Contact Us | Hatrack River Home Page

Copyright © 2008 Hatrack River Enterprises Inc. All rights reserved.
Reproduction in whole or in part without permission is prohibited.


Powered by Infopop Corporation
UBB.classic™ 6.7.2