0

Hello!

I'm currently working on a theatre seat reserving prototype, and I wasn't too sure how to format the database.

The prototype has to call the database to get what seats are taken and what positions are empty.

There are 499 seats in the theatre. Would having 499+ columns in one table and then have to hardcode calling all 499+ columns be the best way to do this?

  • Possible duplicate of [How to implement one-to-one, one-to-many and many-to-many relationships while designing tables?](https://stackoverflow.com/questions/7296846/how-to-implement-one-to-one-one-to-many-and-many-to-many-relationships-while-de) – Quentin Mar 08 '19 at 15:27
  • Re that duplicate: You want to take bookings for *many* seats for *many* performances, so you need a many-to-many relationship. – Quentin Mar 08 '19 at 15:28
  • No, it wouldn't. But surely that doesn't look like any example you saw in whatever information modeling & database design textbook you are following? And if you're not following one, then you haven't done enough research before asking. [ask] And if you wanted us to justify a "yes" or "no"--you would just be asking us to rewrite such a textbook. That's too broad a question. – philipxy Mar 09 '19 at 01:20

0 Answers0