If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > New Database Structure

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-17-07, 13:05
drscares drscares is offline
Registered User
 
Join Date: Jul 2007
Posts: 1
New Database Structure

Hi Everyone,

Thank you for taking the time to read this post.

I am wondering what the best way to setup the following database would be.

Say, for example, I wanted to index all the grocery stores in the neighborhood. And then, I wanted to sort them by what variations of different items they sell. For example, I would have one table to handle all the different grocery stores:

ID | Store Name | Location
1 | Max's Food Mart | 123 Main Street
2 | Food Time| 444 Bacon Street

Now, the goal here is to take a list of different foods that each store sells, but each type of food has certain filters. For example.

Bread can either be Wheat or White.
Cereal can either be Lucky Charms or Cap'n Crunch

The Bread and Cereal would be categories, and the options behind them would be the filters for those categories. So, for example, I could input the data for Max's Food Mart saying whether or not they carry Bread, and then whether or not it comes in white or wheat.

What would be the best way to setup these Categories? Would each category get its own table with the different Filters being the fields? Or would there be a Categories Table and a Filters table?

Please, any advice would be highly appreciated.

Thanks!
Reply With Quote
  #2 (permalink)  
Old 07-17-07, 13:45
healdem healdem is offline
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,262
have a gander at Paul Litwin's tome on Rudy's (R937) site. thats always a good beginning in my books
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 07-17-07, 14:43
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
I'm wondering if this zipped up acccess database might help you
__________________
George
Twitter | Blog
Reply With Quote
  #4 (permalink)  
Old 07-17-07, 18:06
smartsoft smartsoft is offline
Registered User
 
Join Date: Jul 2007
Location: Africa
Posts: 7
The guy is not using Access Database
Reply With Quote
  #5 (permalink)  
Old 07-18-07, 03:17
gvee gvee is offline
www.gvee.co.uk
 
Join Date: Jan 2007
Location: UK
Posts: 10,156
Even if he's not - the concept is pretty similar; which is why I uploaded it.
It's a small data model of how to link items to types. If you'd open it and look at the design you'd see that too
__________________
George
Twitter | Blog
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On