English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I am taking a mySQL test and I have the following question:

Design a number of SQL tables to allow for storing the following information:
A. Companies and company owners.
B. Store locations which belong to one company.
C. Store location hours which allow for orders to be placed at different times on different days.
D. Food orders.

I do not want anyone to directly solve this for me I just need some help pointing me in the right direction as far as the tables to create.

I am thinking of creating 3 separate tables. Companies, Store Info, and Food Orders. Does this sound good?

2007-05-22 02:50:33 · 4 answers · asked by Adam P 2 in Computers & Internet Programming & Design

4 answers

It sounds like you're on the right track. Don't forget to include items B and C in the Store Info table.

You'll also need to make sure you do some date/time comparisons with the Store Info table when you go to process the order.

Good luck.

2007-05-22 02:55:19 · answer #1 · answered by Scotty Doesnt Know 7 · 0 0

You could use only one table, named PROJECTS. Fields: project_name, project_head, project_mem1, project_mem2, project_mem3, any additional ones such as the content for the project. To call the project, just "select * from PROJECTS" possibly with a WHERE statement so you get the specific project. When you need to find all prjects associated with a name, use something like "SELECT * FROM projects WHERE project_head = [username] OR project_mem1 = [username] OR project_mem2 = [username] OR project_mem3 = [username]" Of course, replacing [username] with the name.

2016-05-19 22:20:13 · answer #2 · answered by ? 3 · 0 0

Yes sounds good. Dreamweaver can help a lot when creating databases online, if you are familiar with it.

2007-05-22 02:59:52 · answer #3 · answered by Umpalumpa 4 · 0 0

I think you are correct .I.e Three Tables.

2007-05-22 03:33:05 · answer #4 · answered by Anonymous · 0 0

fedest.com, questions and answers