Jump to content
xisto Community
Sign in to follow this  
oncombeureum

How To Make A Recipe Db In SQL ? Recipe Process ?

Recommended Posts

Let review the given table below:

=========================================

1. Fruit 2. FruitGroup

codeF c 4 codeGF c 4

codeF c 20 nameGF c 25

codeF c 4

 

3. FruitMix

codeFM c 4

nameFM c 25

 

4. ComponentFM

codeCFM c 4

codeFM c 4

codeGF c 4

codeF c 4

qty int 1

 

 

=========================================

Fruit:

codeF nameF codeGF

f001 Papaya raw GF01

f002 Papaya Old GF01

f003 Banana raw GF02

f004 Banana Old GF02

f005 Red Chili GF03

 

FruitGroup

CodeGF nameGF

GF01 Papaya

GF02 Banana

GF03 Chili

 

FruitMix

CodeFM nameFM

Fm001 Tasty

Fm002 Hot

 

ComponentFM

codeCFM codeFM codeGF codeF qty

cfm1 fm001 null f001 4

cfm2 fm001 null f004 2

cfm3 fm001 null f005 1

cfm4 fm002 GF01 null 4

cfm5 fm002 GF03 null 5

 

 

=========================================

the skenario

 

1. user will input list of fruits into a temporary table.

 

2. temp table will then be compared into componentFM to check whether which FruitMix is achieved.

 

sample:

code name qty

* f001 Papaya raw 4

* f002 Papaya old 2

* f005 Red Chili 5

 

from the temp table there, the fruit mix that will be generated as follow:

code name applicable missing item

1. Fm001 Tasty NO 2

2. Fm002 Hot YES

 

 

question..

I'm hoping friend here will help me with the correct algoritma to use with this simple but not soo.. problem.

 

thanks

 

 

Oncom Beureum

The Best Place in the City

Edited by microscopic^earthling (see edit history)

Share this post


Link to post
Share on other sites

haha... cool concept - I'd never thought of breaking up data like this. Your task can be accomplished with a little careful data manipulation :( I'm sure someone will have some brilliant idea for you here... All the best !

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.