I am trying to create a matrix which should look like the following:
one item dumplings salad chicken-fried chicken-grilled desert-cake desert-pie
----------- ------------ ------ ---------------- ----------------- -------------- -------------
dumplings 1 1 0 0 2 0 1
salad 1 0 0 0 0 0 0
chicken-fried 2 0 0 0 0 4 0
chicken-grilled 3 0 2 0 0 0 0
desert-cake 7 0 0 4 0 0 0
desert-pie 0 1 0 0 0 0 0
The numbers are the count of the pairing of the different
menu items ( (dumplings,salad), (dumplings,chicken)..(chicken,desert), etc.)
per order (per_order) or sometime only one item can be selected from the menu.
The menu types dumplings, salad, chicken, desert could have sub categories,
which are be in the table subcategorys.
For example chicken could have subcategorys: Fried, Grilled and desert
could have subcategory: Cake and Pie.
The date is gathered per_order which is in the menus table
The tables involved are:
menus
-----
menu_id varchar
per_order varchar
menuitem_type number
subcategory
-------
subcategory_id varchar
menu_id varchar
subcategory_type number
The table that differentiates between menu and
subcategory information is a common table:
common
------
item_type_number number (this number is sequential per item type:
menu(1,2,3,etc); subcategory(1,2,3) and
referenced in menuitem_type and
subcategory_type in menus and subcategory
tables)
menuitem_subcategory_type varchar2
show_value varchar2
Data for the common table would look like:
item_type_number menuitem_subcategory_type show_value
---------------- --------------------- ----------
1 menu dumplings
2 menu salad
3 menu chicken
4 menu desert
1 subcategory fried
2 subcategory grilled
3 subcategory cake
4 subcategory pie
I know this seems like a lot of information, but if anyone could help me in this matter I would greatly appreciate it.
getjbb
one item dumplings salad chicken-fried chicken-grilled desert-cake desert-pie
----------- ------------ ------ ---------------- ----------------- -------------- -------------
dumplings 1 1 0 0 2 0 1
salad 1 0 0 0 0 0 0
chicken-fried 2 0 0 0 0 4 0
chicken-grilled 3 0 2 0 0 0 0
desert-cake 7 0 0 4 0 0 0
desert-pie 0 1 0 0 0 0 0
The numbers are the count of the pairing of the different
menu items ( (dumplings,salad), (dumplings,chicken)..(chicken,desert), etc.)
per order (per_order) or sometime only one item can be selected from the menu.
The menu types dumplings, salad, chicken, desert could have sub categories,
which are be in the table subcategorys.
For example chicken could have subcategorys: Fried, Grilled and desert
could have subcategory: Cake and Pie.
The date is gathered per_order which is in the menus table
The tables involved are:
menus
-----
menu_id varchar
per_order varchar
menuitem_type number
subcategory
-------
subcategory_id varchar
menu_id varchar
subcategory_type number
The table that differentiates between menu and
subcategory information is a common table:
common
------
item_type_number number (this number is sequential per item type:
menu(1,2,3,etc); subcategory(1,2,3) and
referenced in menuitem_type and
subcategory_type in menus and subcategory
tables)
menuitem_subcategory_type varchar2
show_value varchar2
Data for the common table would look like:
item_type_number menuitem_subcategory_type show_value
---------------- --------------------- ----------
1 menu dumplings
2 menu salad
3 menu chicken
4 menu desert
1 subcategory fried
2 subcategory grilled
3 subcategory cake
4 subcategory pie
I know this seems like a lot of information, but if anyone could help me in this matter I would greatly appreciate it.
getjbb