MySQL database structure ??

I would like to create a database that I guess would kind of be like how craigslist has theirs (I assume).

I don’t want people to list items for sale though, I just think that their structure would work best for me.

Can someone tell me how they would structure it?

I would like State -> County -> City -> then from there a posting containing $title, $date, $location, $items, etc…

I would also like to display the city underneath the correct county.

I’m not asking for the code for this I am just asking for a starting point (basically the structure of it).

Any help is very appreciated

I would create a series of tables.

1 Cities
2 States
3 Counties

Then I would create a master relations table for those three tables with the FKs to each entry

so California:Orange County:Los Angelas would be 1:1:1 in my master table assuming that california’s FK was 1

then your final table would be an FK to your master relations table and the title, date, location information

all told about 5 tables I think.

Sponsor our Newsletter | Privacy Policy | Terms of Service