Jump to content

Stuck on Relationships for a Database Please Help


artisticre

Recommended Posts

I have a night club website that wants a database done.  There are two tables, one for Events and one for Venue.  Each venue could have many events but each event would have one venue.  Could someone look at my tables to see if the relationships are correct?  Also, could someone suggest a way that might optimize these tables as much as possible? 8)

 

Events

event_id (PK)

eventtype

eventdate

eventtime

eventinfo

 

 

Venue

venue_id (PK)

name

address

city

state

zip

clubtype

phone

musictype

info

featured

event_id

 

Link to comment
Share on other sites

since each event has only one venue, the event would have the venue_id, not vice versus. also, date and time can be in one field:

 

Events

event_id (PK)

eventtype

eventdatetime

eventinfo

venue_id

 

Venue

venue_id (PK)

name

address

city

state

zip

clubtype

phone

musictype

info

featured

Link to comment
Share on other sites

Thanks for the reply.  When I insert into these tables, which table would I insert into first?

 

 

 

 

 

 

 

Hi

 

Would move the many relationship key:-

 

Events

event_id (PK)

eventtype

eventdate

eventtime

eventinfo

venue_id

 

 

Venue

venue_id (PK)

name

address

city

state

zip

clubtype

phone

musictype

info

featured

 

All the best

 

Keith

Link to comment
Share on other sites

Well, you should only have one row in Venues per venue. Most places would have this table populated already. Either way though, the venue must exist, so you can get it's id, before you can insert the event int the events table.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.