本文介绍了剧院座位预约的DB结构的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我被要求为学校项目设计一个剧院座位预订和售票系统。



这是场景:



旅游公司需要允许在线用户预订不同场地的演出席位。



数据库需要存储座位布局他们在特定场地进行的每场演出。



例如,该公司可能会在今年使用Peter Pan并使用伦敦钯的所有座位,但明年他们可能决定使用减少的座位安排在Palladium做另一场演出。



因此,每个座位必须分配到一个场地和一个节目。 br />


目前,我有一个名为座位的表,其中包含一个seatID(主键),VenueID,ShowID,Row,SeatNumber。



当用户想要为特定表演保留座位时,我们会检查该表演和场地的座位是否已被读取y存在于Performance_tickets表中。



这是进行座位预订的典型方式吗?



An我考虑的另一种选择是在创建表演时自动创建所有座位然后具有座位状态(即保留/未保留)。

I've been asked to design a theatre seat reservation and ticketing system for a school project.

Here's the scenario:

A touring theatre company needs to allow online users to book seats for performances at different venues.

The database needs to store the seating layout for each show they do at a particular venue.

For example, the company might be doing Peter Pan this year and using all seats at the London Palladium, but next year they might decide to do another show at the Palladium using a reduced seating arrangement.

Therefore, each "seat" has to be assigned to a venue AND a show.

Currently, I have a table called "seats" which contains a seatID (primarykey), VenueID, ShowID, Row, SeatNumber.

When a user wants to reserve a seat for a particular performance, we check whether the seat for that performance and venue already exists in the Performance_tickets table.

Is this the typical way of doing seat reservations?

An alternative I considered was creating all the seats automatically when a performance is created and then having a seat status (i.e. reserved/not reserved).

推荐答案


这篇关于剧院座位预约的DB结构的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-22 15:52