Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Database layout/design inefficient

The image shows my proposed layout for part of a database. My concern is with the price bands and the way these attach to [shows] and [bookings]. There needs to be a list of price bands (as in titles) but the same band can have multiple values depending on which show it is attached to (a standard ticket for Friday could be £10 where as a standard ticket on Saturday could be £11).

It just seems to me with this approach them will be a lot of almost identical data - lots of entries for £5 tickets in [showpriceband] with the only difference being the showid.

Is there a better approach to this?

proposed database layout

like image 657
GJKH Avatar asked Nov 12 '13 10:11

GJKH


1 Answers

I think that your approach is correct. You have

  • different ticket types
  • different shows

And their relation is n:n. The correct solution for resolving a n:n relation is a separate table (in your case ShowPriceBand) to enlist all the combinations.

like image 196
The Conspiracy Avatar answered Sep 30 '22 13:09

The Conspiracy