6 messages in com.mysql.lists.mysqlDatabase Design Advice
FromSent OnAttachments
Edward Dudlik12 May 2003 09:29 
Becoming Digital12 May 2003 13:22 
Daniel Kasak14 May 2003 18:38 
dan...@electroteque.org14 May 2003 18:44 
Edward Dudlik14 May 2003 22:40 
Edward Dudlik14 May 2003 22:41 
Subject:Database Design Advice
From:Becoming Digital (su@becomingdigital.com)
Date:05/12/2003 01:22:29 PM
List:com.mysql.lists.mysql

I'm setting up a database for a new project and I keep wavering on one aspect of the design. The end result is to be a searchable menu for a restaurant's website and I cannot decide if it is best to simply use one table for everything (food) or use tables for each category (pasta, appetizers, etc). I currently have a table listing said categories (category) but I simply can't decide which is better for this application. Thank you all for your advice.

Below is some info from MySQL regaring the current design of the DB.

SHOW TABLES; +---------------+ | Tables_in_tga | +---------------+ | categories | | drinks | | food | | specials | +---------------+

DESCRIBE categories; +-----------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +-----------+---------------------+------+-----+---------+----------------+ | cat_id | tinyint(3) unsigned | | PRI | NULL | auto_increment | | cat_name | char(100) | | UNI | | | +-----------+---------------------+------+-----+---------+----------------+

DESCRIBE food; +------------+---------------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +------------+---------------------+------+-----+---------+----------------+ | item_id | tinyint(3) unsigned | | PRI | NULL | auto_increment | | cat_id | tinyint(3) unsigned | | | 0 | | | item_name | char(50) | | | | | | item_desc | char(255) | | | | | | item_price | float(5,2) | | | 0.00 | | +------------+---------------------+------+-----+---------+----------------+

Thanks again.