SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot jb007irl's Avatar
    Join Date
    Jun 2003
    Location
    Ireland
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Stadium Representation in a Database

    How would I represent a stadium object in a database?

    I'm designing a ticketing application to sell tickets to events. These events take place in stadiums. A stadium has stands, stands have tiers, tiers have sections and sections have seats.

    But how do I represent all that in a database? Or should the ticket have all those properties associated with it? i.e. a ticket is for a seat in a section in a tier in a stand in a stadium?

    Just some pointers on which way I should go with this please?
    Last edited by jb007irl; May 27, 2004 at 13:56.

  2. #2
    SitePoint Member
    Join Date
    May 2004
    Location
    Cheshire, UK
    Posts
    6
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In really, really simple terms you would:

    stadium (table)
    stadium_id
    name
    description

    stand (table)
    stand_id
    name
    description
    stadium_id -- so that this stand is in a particular stadium

    tier (table)
    tier_id
    name
    description
    stand_id -- so this tier is in a particular stand

    and so on...

    So for any seat you could drill up to its section -> tier -> stand -> stadium.

    And you see how many seat/tickets are sold in a stadium by linking the other way.

    You might want to add an event table which might have a specific date because then you could sell many tickets for one seat (just on different dates).

    Hope this helps

  3. #3
    SitePoint Zealot jb007irl's Avatar
    Join Date
    Jun 2003
    Location
    Ireland
    Posts
    129
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you, what you've outlined here is basically the way I've set it up but I just wanted to make sure somebody else would do it in a similar way as I'm far from the best database designer in the world.

    Thank you for replying.


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
  •