sanchez_1960
01-19-2007, 02:55 AM
I want to develop a ticket booking system. Here is a brief rundown:
- There are 10 locations of an event.
- Each location has 1 event every single day of the week.
- Each day at each event only has a certain number of allocations.
Are there any examples of similar systems? Would the makup of this be pretty straight forward? Do i have to store each date manually in the db?
sanchez_1960
02-02-2007, 02:13 AM
Any help on this would be much appreciated :D
chazzy
02-02-2007, 10:17 PM
to me you're asking for something very specific. i doubt that there are any systems that are close to what you're describing exactly.
NightShift58
02-03-2007, 07:32 PM
As Chazzy said, this is a very specific requirement and it's doubtful you'll find something "out there" ready to roll. You may have to build it yourself. If you do, you'll need at least 3 table to accomodate the basic booking mechanism:-- CREATE: bk_events
CREATE TABLE `bk_events` (
`ev_id` int(5) NOT NULL auto_increment COMMENT 'event unique id',
`ev_name` varchar(255) default NULL COMMENT 'event name',
`ev_desc` varchar(255) default NULL COMMENT 'event description',
PRIMARY KEY (`ev_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- CREATE: bk_locations
CREATE TABLE `bk_locations` (
`bk_loc_id` int(11) NOT NULL auto_increment COMMENT 'location unique id',
`bk_loc_name` varchar(255) default NULL COMMENT 'location name',
PRIMARY KEY (`bk_loc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- CREATE: bk_evtbookings
CREATE TABLE `bk_evtbookings` (
`ev_bk_id` int(5) NOT NULL auto_increment COMMENT 'event booking unique id',
`ev_evt_id` int(5) default NULL COMMENT 'event ID',
`ev_loc_id` int(5) default NULL COMMENT 'event location ID',
`ev_week` date default NULL COMMENT 'event date (beg of week)',
`ev_d1_available` int(5) default NULL COMMENT 'event available tickets',
`ev_d1_booked` int(5) default NULL COMMENT 'event tickets sold',
`ev_d2_available` int(5) default NULL COMMENT 'event available tickets',
`ev_d2_booked` int(5) default NULL COMMENT 'event tickets sold',
`ev_d3_available` int(5) default NULL COMMENT 'event available tickets',
`ev_d3_booked` int(5) default NULL COMMENT 'event tickets sold',
`ev_d4_available` int(5) default NULL COMMENT 'event available tickets',
`ev_d4_booked` int(5) default NULL COMMENT 'event tickets sold',
`ev_d5_available` int(5) default NULL COMMENT 'event available tickets',
`ev_d5_booked` int(5) default NULL COMMENT 'event tickets sold',
`ev_d6_available` int(5) default NULL COMMENT 'event available tickets',
`ev_d6_booked` int(5) default NULL COMMENT 'event tickets sold',
`ev_d7_available` int(5) default NULL COMMENT 'event available tickets',
`ev_d7_booked` int(5) default NULL COMMENT 'event tickets sold',
PRIMARY KEY (`ev_bk_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;The first table, bk_events, is where you would define your events.
The second table, bk_locations, would hold the definitions of the locations you have available.
Finally, table bk_evtbookings is where the specific booking information is stored, per event, location and day of week.
It includes a reference to the event (selectable from bk_events) and location (selectable from bk_locations).
Since each event is held every day of the week at a given location, you would store the first day of the week under the field "week" and store both the number of available tickets and tickets sold in the ev_dx_available and ev_dx_booked, where "x" is 1 thru 7 for the days of the week.
You'll likely need a couple of administrative tables (for example: users, login, who's allowed to see and who's allowed to make changes, etc.)
Lots of work left to do...