Click here to Skip to main content
15,902,908 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have made a screen table in database that consists of seats like of type (PREMIUM,GOLD,SILVER).
So there will be 6 shows in a day that will be playing on that screen.
like first show at 8.30, then 10.00,13.30,16.00,19.00,22.00.
Obviously for each show time i have to maintain different seat status of screen for the show.


is there any better idea than this, to save time space?

What I have tried:

i have an idea to create 6 tables for screen one and then connect each in the form with its particular time slot.
But this way i need to maintain 6 tables
Posted
Updated 7-Jun-17 23:41pm

Quote:
is there any better idea than this, to save time space?
Nope, I believe. After all, it is independent information.
 
Share this answer
 
Have a "Show" table

SQL
ID StartTime
1 8:30
2 10:00


etc

Extend your Seat table to have ShowID

SQL
ID, ShowID, SeatNumber, SeatType
1, 1, 101, Silver
2, 1, 102, Silver
...
1001, 2, 101, Gold
1002, 2, 102, Premium
....
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900