I am trying to come up with a generic game-plan that I can possibly use for multiple client, although right now I am focused on this one Events Promoter that I may have a gig with.
Taking into account some other sites I am pursuing, I think it is a good idea to track Customers. (On related prior threads, I spent a lot of time learning how to: Create a Customer Account, Log-In/Log-Out, Create a Customer Profile, etc because I wanted to create online forums like SitePoint and get more Web 2.0ish)
So, let’s assume we want to know who a Customer is and store his/her info. (A “Customer” just being the person paying for things. Not the Attendees.)
* Professionally, I don’t think it’s very smart to not keep track of a single (unique) customers orders over time. None the less, if you don’t think that information is valuable there is little need for a customers table.
I agree.
That said, taking into considering the business model you have presented here I would define these tables.
- orders
- tickets (tickets that have been ordered in an order)
- events (event details including ticket price, description, w/e else)
Well, this is what I drew out last week…
- One CUSTOMER (payor) has one or more ORDERS
- One ORDER has one or more TICKETS/ATTENDEES
- One EVENT has one or more TICKETS/ATTENDEES
I think we came to similar conclusions, except here…
tickets (tickets in an order)
- id
- orders_id (order that this “ticket” belongs to)
- events_id (event ticket was order for)
- quantity (number of tickets ordered for this event)
~ sale_price (not sold on this considering events will expire so I don’t think the price will change, right? Normally, though if you were selling physical items that have changed in price over time you would to store the price here… well not need but that would be simplest way to retain the information for historical purposes)
- Unique key (orders_id,events_id) or make it a primary key and dump the surrogate key, whatever floats your boat.
Visually we have…
CUSTOMER -||------|<-ORDER
ORDER -||--------|<-ATTENDEE/TICKET ->----------||-EVENT
Explained using an example…
CUSTOMER (Mike Brady)
ORDER (1234)
ATTENDEES
Mike
Greg
Carol
Peter
Bobby
Marcia
Jan
Cindy
Alice
TICKETS
0001
0002
0003
0004
0005
0006
0007
0008
0009
(If Alice was sick, Cindy could bring her friend “Lucy” in Alice’s place.)
EVENT
“Christmas Spectacular”
Mannheim Steamroller
Acme Theater
Los Angeles, CA
December 20, 2011
7:00-10:00pm
The ORDER would have a Quantity of 9 Attendees/Tickets.
Even though technically…
ORDER -<---------->-EVENTS
The ORDER could only ever be associated to ONE EVENT (Unlike normal Orders where you might order 20 different Products!!)
Each ATTENDEE/TICKET could have a different Price, Designation, Seating, and so on. (Maybe “Alice” got the “Senior Discount”?!)
Disclaimer: This will not support reoccuring events in the best light. However, I did not see that as part of the business model. Additionally, it does not take into consideration multiple ticket prices per event… again not part of the scope outline. The only reason I say this is because your notorious for changing requirements… or not being as specific as you should be upfront expecting everyone else to just “know” undocumented requirements… we can’t. So yeah… for the sake of keeping this as *simple as possible requirements that have not been explicitly accounted for are not supported considering the more requirements the more complex the solution will need to be.
Ouch!!
Why do you say that?! 
I am extremely detailed in most of my Threads and responses.
I don’t think I suffer from “Scope Creep”, but I do evolve what I want - or more like “further clarify” it!
Debbie