Hey I was just wondering if I could get some advice from you guys. I'm trying to write basically a cookbook program for my mom. She wanted to put them on the computer to save them and I thought WTH I could write her a program not only helping her but adding to my portfolio. Now my question is, what is the best way to store the recipes. At first I thought Access DB (because I don't know really how to use any other DB program), but I wasn't sure how I could link up the description of the recipe. I could easily write the program in C# using Access if all I was doing was ingredients. Unless you guys think I could just put the directions in a filed of their own. (Sorry I like to think a lot as I type, especially while asking for help) My other thought was a linked list but then quickly decided that would be a very HUGE program and not a good way to store many recipes. So again just looking for some advice on the best way to store my data. Thanks to anybody who lends a hand.

Recommended Answers

All 5 Replies

Create table for recipe (name, description, avg. time to do it, how to make it etc..)
Create table form ingredients (name, etc..)
Create bridge table for both tables (DB concepts)
It's almost done!
Make a program to connect to this database search on (recipe name or recipe description) and show how to make it and some light logic.

You should thank your mom because she'll make you learn something new.

Be sure to add an automatic database backup feature! And if it were mine i would grab one of those open source PDF libraries and add an "Export to PDF" feature so it will be simple for her to share her recipes with friends and family!

Of course you could consider storing information about the recipes in a DB and storing the actual recipes themselves in a plaintext format with a different extention in a monitored subfolder of the user's documetns folder. making it very easy to back up and share the recipes, you could then have these recipe documents automatically open with your software with the option of coping it to that user's recipes folder and adding the information to the collection!

Just some suggestions. This sounds like a great idea :)

commented: Great advice!! Never would've thought about this on my own. +1

I'm not sure if you can still post on threads that have been marked solved or not. If a mod sees this could you let me know if that is possible. I don't want to leave a post open all the time (also don't know if that is allowed) but I also would like any other suggestions any user would like to tell me. I'm always up for suggestions.

Of course you could consider storing information about the recipes in a DB and storing the actual recipes themselves in a plaintext format with a different extention in a monitored subfolder of the user's documetns folder.

Diamonddrake by this do you mean haveing the program store it say "...program folder\recipes\recipes.txt"? Also I like the idea of the pdf feature. Would have to really do some research into that unless it would work the same way as saving a file in txt format.

Thank you to both of you for the great advice.

Sorry I been away for some time.
I actually think something like
"C:\Users\username\Documents\Recipes\recipiename.specialrecipeext"

have a db store information about the recipes for easy searching. but the actual recipes them selves be stored as recipe files

But it would be complicated there is nothing wrong with using a database alone.

also, There are some free C# libraries out there that will allow you to create PDF documents on the fly. I have used a few and they do work. Good luck with you app.

I would have just done a massive text file. But that wouldn't really allow searching etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.