[thelist] Database Design help

Mark Groen markgroen at gmail.com
Sun Apr 3 12:23:05 CDT 2005

----- Original Message ----- 
From: "Kath" <>
To: <thelist at lists.evolt.org>
Sent: April 3, 2005 9:19 AM
Subject: [thelist] Database Design help

> I'm a database newbie attempting to design a database that will
hold the
> restaurant info on this site - http://www.gemsguides.com/

not a guru myself, but the list is slow on weekends so will take a go
at it...

> So far I have 4 tables:

Too many tables for this db imho, you only have four cities and if
you make your edit area for the client have that option as a drop
down, you'll be sure to get only the data you want in that field and
the colour code becomes not needed (in the database that is, you
would change the colour as per the output of which city it is - if
city equals something, then the css class for that list item is
something) as it's already sorted by the city.

> I'm stuck on how to get the services tied into the Restaurants and
in the
> correct color key.

Having each restaurants' info all in the same row of the table keeps
you from having to do complicated joins later. iirc, it's a bit
bigger hit in some scenarios to have just one table, but you're not
really dealing with much data here and php/mysql would whip through
it in a couple nanoceconds.

It would be really quick for the client to just click drop downs for
everything but the name, phone number and address on inputting the
data, then later the site visitor could make a selection from drop
downs of the features/location they want in a restaurant and voila,
just what they are looking for.

Easier coding the forms too, build one and then the edit/insert forms
for the admin area are basically the same (to you) with the field
values tweaked and almost the same forms for the site visitor as

> types, but I'm unsure of how to proceed to connect the two and get
> color coded correctly.  Can anyone help?

see above, if city = $x then cssClass = foo

just some ideas thrown out on a Sunday morning...hth!



More information about the thelist mailing list