Intermediate Example
Data Model
The ostc_ServerOperations access persistent data stored in an ObjectStore database. This data uses the following classes:
- Show: Each show has a name, description, and an associated collection of performances.
- Performance: Each performance has an associated show, theater, and date and time (represented by a char*). Each performance also has an associated collection of bookings objects.
- Booking: Each booking has an associated seat number, row number, price, and confirmation number (which identifies the purchaser). It also has an associated Boolean that indicates whether the seat has been purchased.
- Theater: For simplicity, a given theater is assumed to have the same number of seats in every row. So a theater's seating is described by two numbers: the number of rows in the theater, and the number of seats per row. Each theater object stores these two numbers, as well as the theater name.
The operation implementations rely on the following database entry points:
[previous] [next]