This is like the third or fourth request that I've seen on EE for the exact same problem over the last year. Is everyone working on a new theater software package???
Instead of creating and storing the entire array, which will be wasteful of both memory and disk space, it is probably best to build a single 2-D array by venue to record which seats are available, with a primary key on venue/section/row/seat. This is important because you can also add more attributes (obstructed view, mezzanine, etc.) to the list to help in pricing decisions.
Add an event table which has a simply ID field as the key, including the event title, date, and other such items.
Then, you can add another table that contains the reservations, with a primary key of event/venue/section/row/se
These tables can be created in any SQL database, including MySQL, SQLServer, Pervasive PSQL, Postgres, Oracle, or others, using standard ADO interfaces for reading and writing the data to/from the files.
Main Topics
Browse All Topics





by: DropHitMediaPosted on 2008-10-01 at 04:57:07ID: 22613299
Im not sure how this works in c++ but most array moves to/from dbase would involve converting the array into a character seperated string then back into an array.
But, it seems that you could simply store each reservation, as they are made, in the dbase, then simply include the row, seat and date as data for that record:
UniqID - Date - Row_Col
1 - 12/12/2008 - 1,12
So now you simply have a 2 dim array storing the Row_col and can insert this by making the array into a comma seperated value before inserting.
Do a search on google for storing arrays in databases which should help.