Recipe management software?

For everything that's not in any way related to PureBasic. General chat etc...
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

If I can help with the normalisation give me a shout.
If you understand 3NF normalisation and how to use it, I will send you the current structure and explain to you where the bottleneck currently will be unless it's fixed.

I need all the help that I can get and I've seen huge web databases created by 'professionals' that still didn't do it right.

Saw an example for setting up the ingredients properly somewhere and forgot to bookmark it. It was brilliant.
Amateur Radio, D-STAR/VK3HAF
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Recipe management software?

Post by collectordave »

Hi fangbeast

Yes send me the current structure with explanation etc I can work on it over this week.


Quick edit

Is it the same as in your latest release as in the _AddRecipebookTables.pbi as I have allready converted that to an sqlite database and can start from there.

A little bit of data in populated in the database will give me a head start.

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Recipe management software?

Post by collectordave »

Hi fangbeast

Been awhile

How are you getting on with the recipe database?

cd
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Wow. Did I write some shit back then!!! Hang on a minute, I still do!!! Now I hope to beat approaching age and senility and finish some final shit before I retire with my mutated goat collection!!!!
Amateur Radio, D-STAR/VK3HAF
collectordave
Addict
Addict
Posts: 1309
Joined: Fri Aug 28, 2015 6:10 pm
Location: Portugal

Re: Recipe management software?

Post by collectordave »

Hi

One of the big bottlenecks is getting data into into a meaningful table that can be indexed.

May I try to give a little explanation?

With a recipe database I can start with just two tables.

Recipes

Recipe_ID plus other details of the recipe without ingredients.

Ingredients

Ingredient_ID plus any other details of the ingredient without quantity as this is dependent upon the recipe.

The first problem is that any recipe can have any number of ingredients and any ingredient can appear in any number of recipes, but a workable database can be built by simply adding all the ingredient_IDs to the recipe in the recipe table

With any Many to Many relationship it is worth considering what I will call a link table, this table will contain just two fields at first.

Recipe_ID and Ingredient_ID

Now to consider quantities of ingredients. Yes the quantity can be included in the recipe table but then for each ingredient two fields are required Ingredient_ID and quantity for that ingredient. So adding another ingredient to an existing recipe becomes quite complex.

If the quantity is included in the link table as below:

Recipe_ID,Ingredient_ID,Quantity

Adding or removing an ingredient or altering the quantity becomes simple.

Of course you must then consider the queries to made on the data.

I can only guess:

The first guess is to fetch all recipes that use such and such an ingredient or a list of ingredients.

My second guess would be based on someone who has just raided their pantry and found some ingredients but in limited amounts.

Both queries are quite simple if using the link table.

A sample SQL could be:

SELECT * from <link table> WHERE Ingredient_ID = 123 OR Ingredient_ID = 456

This will be quite fast. After completing the query each Recipe_ID can be read into a list of integers and the recipes can be displayed one by one to the user or as a list using:

SELECT * FROM Recipes WHERE Recipe_ID = “one from the list” stepping through the database one at a time.


Long time since I asked but if you can use a little help I am back again hopefully with a computer that will carry on working long enough.

Hope this helps.

CD
Any intelligent fool can make things bigger and more complex. It takes a touch of genius — and a lot of courage to move in the opposite direction.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Dave, my post was meant to be humorous and I wasn't asking for help.

Finished the program years ago with help from InfraTec and now am on to other things as my aging brain permits me (The cold and windchill down here doesn't help!!)
Amateur Radio, D-STAR/VK3HAF
User avatar
idle
Always Here
Always Here
Posts: 5042
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Recipe management software?

Post by idle »

Fangbeast wrote: Fri Aug 12, 2022 11:48 pm (The cold and windchill down here doesn't help!!)
Try putting some pants on then. :lol:

I just got a niu mqi sport, an electric moped and I can attest to the cold and windchill down there too, the cat didn't like being used as a sporran and it wouldn't play balls either!
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Try putting some pants on then. :lol:
i did!! Over my head!! Wasn't that where it was supposed to go???
I just got a niu mqi sport, an electric moped
Lazy sod, try walking for a change:):)
and I can attest to the cold and windchill down there too,
What do you kiwi sheep rooters know about windchill, you always have them wrapped around your asses:):)
the cat didn't like being used as a sporran
Because it had nothing substantial to play with??? (Innocent look)
and it wouldn't play balls either!
Same as above (HEHEHHEHEHEHEHEHEHEH)

By the way, that last mutated sheep you sent me had some very unusual marks around in certain places. What the hell did you do to it??

P.S. Too bloody cold to do much of anything still. Being in a coastal town is hard. I used to do so much too.
Amateur Radio, D-STAR/VK3HAF
User avatar
idle
Always Here
Always Here
Posts: 5042
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Recipe management software?

Post by idle »

It sounds like an improvement over your previous abode, coastal living is the best. Barbara had dx,d ewe so I desexed ewe.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

Didn't quite understand that cryptic code. it sounded like Barbara the sheep was a desexed ewe that you had???
Amateur Radio, D-STAR/VK3HAF
daveb
User
User
Posts: 30
Joined: Tue Jun 07, 2022 6:12 pm

Re: Recipe management software?

Post by daveb »

I have only just become aware of this thread. Obviously almost all of the links are now dead.
Since Fangbeast says "Finished the program years ago with help from InfraTec", I was wondering if anyone knows where a copy of that program might be found?
User avatar
idle
Always Here
Always Here
Posts: 5042
Joined: Fri Sep 21, 2007 5:52 am
Location: New Zealand

Re: Recipe management software?

Post by idle »

Sorry off topic comment
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

daveb wrote: Sun Aug 14, 2022 10:54 am I have only just become aware of this thread. Obviously almost all of the links are now dead.
Since Fangbeast says "Finished the program years ago with help from InfraTec", I was wondering if anyone knows where a copy of that program might be found?
Sorry Daveb, I literally meant just that, years ago. I did the program basics, forms, all the underlying stuff and Infratec wrote ALL the recipe import/export stuff. And anything else requiring intelligence:):)

The directories are now 173MB of bits of code all over the place, ripped to shreds. Not a complete program to be found.

If I live long enough (And Idle's weird little ditty may kill me as I try to understand it), I will get to finish my latest junk for the family which will have bits of the recipe database in it (along with all the other separate databases I made over 15 years) but it's too damned cold here to code anything right now.

Don't even know where the forms are right now either.
Amateur Radio, D-STAR/VK3HAF
daveb
User
User
Posts: 30
Joined: Tue Jun 07, 2022 6:12 pm

Re: Recipe management software?

Post by daveb »

Thanks for taking the time to reply Fangbeast. Having read through the thread I wasn't expecting a full "all singing/dancing, bells & whistles" finished program. In recent times I have been trying to get a better understanding of SQLite, with the idea of building something similar to that which you were working on back then. Sadly, I was not much involved with PB before 2016, so I missed out on the stuff you made available.
Anyway, get warm, stay well and steer well clear of Idle's weird little ditties :lol: my friend.
User avatar
Fangbeast
PureBasic Protozoa
PureBasic Protozoa
Posts: 4747
Joined: Fri Apr 25, 2003 3:08 pm
Location: Not Sydney!!! (Bad water, no goats)

Re: Recipe management software?

Post by Fangbeast »

I can probably find the import routines that InfraTec did for me with a bit of searching. He is so way beyond my skill that it took a long time to integrate it all.

As for idle, he and I have been having this fun for centuries. We used to do this when the forum was more fun:):)
Amateur Radio, D-STAR/VK3HAF
Post Reply