Jump to content

Archived

This topic is now archived and is closed to further replies.

dbdummy

database table structure

Recommended Posts

Hi,

I am trying to figure out how to create my tables and am somewhat stuck, database structures totally confuse me.

My end result needs to be a schedule of courses offered in various cities. ie

City: Austin
Course: 101
Course Description: 101 is this
Date: June 5, 6
Course: 102
Course Description: 102 is this
Date: June 7, 8, 9
Course: 103
Course Description: 103 is this
Date: June 10, 11, 12

City: Houston at Someplace
Course: 101
Course Description: 101 is this
Date: June 7, 12
Course: 112
Course Description: 112 is this
Date: June 13, 14, 14
Course: 123
Course Description: 123 is this
Date: June 18, 19, 20

So, I created a table named cities (not even sure if I really need a cities table, but the names can be quite long...ie, the city name may contain where the location is, ie, Tucson at River Rd. and Campbell Ave.

in cities I have
- place (primary key)
- city_name
- city_location

I created a table named courses
in courses I have
- ckey (primary key)
- course_number
- course_name
- course_description

then I need to create a table named schedule

this is where I am most confused

I need to know the city_name, city_location, course_name, course_description and the dates for that particular course in that particular city.

any help is appreciated.

Share this post


Link to post
Share on other sites
A simple lookup table with a few FKs from your other tables should suffice.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.