SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Enthusiast alnixon's Avatar
    Join Date
    May 2001
    Location
    Preston (UK)
    Posts
    62
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    do all tables need a primary key?

    say I have these tables

    musicstyle
    ----------
    styleID
    stylename
    styledescription

    event
    -----
    eventID
    eventDate
    eventStartTime
    eventFinishTime

    and these tables are linked with this table:

    eventstyle
    ----------
    styleID
    eventID
    styleStartTime
    styleFinishTime

    I can not make both the styleID and eventID the primary key because a musicstyle may be played on seperate occasions at one event (thus creating a duplicate primary key).

    Now should I add an auto_increment primary key in the table eventstyle or should I do without a primary key?
    Da Big Cheese
    --------------
    I'm not entirely sure on this, but ....
    [insert my post here]

  2. #2
    imagine no limitations exbabylon's Avatar
    Join Date
    Dec 2000
    Location
    Idaho, USA
    Posts
    452
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I would add a nother column to that last table called ID or something, because it's always helpful to have.
    Blamestorming: Sitting around in a group discussing why a deadline was missed or a project failed and who was responsible.

    Exbabylon- Professional Internet Services


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •