Click here to Skip to main content
15,888,461 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I have a database which contains 2 screen tables which contains seats of show which can be 1 or 0 according to selection.
every thing is working fine, when i choose a ticket for a day at a particular time seats get booked and all.
But suppose i booked a ticket for 25 June 2017 of 8:30 show the seat will get selected . but after that when i search for the same show but on date 26th June 2017 or any other date it should not show that it is booked but it shows it is booked.

how can i overcome this problem without using much space n easily cause rest of the program is running perfectly

What I have tried:

i didn't tried anything cause i don't have any clue about how to achieve this. i just cant go on making different screen table for different days it ain't feasible.
Posted
Updated 25-Jun-17 4:20am
Comments
Michael_Davies 25-Jun-17 9:41am    
A lot depends on your database design. In order to understand people would need to see the schema and how you are booking.

You could have a table with a field per seat and a date field one row per day. High disk cost and data transfer.

You could have a master table holding the date joined to a table by and id field with just the id and a field to hold an integer for the the seat number; if the record exists then the seat is booked if not it is free. This would keep the disk space usage down.
chinu1d 25-Jun-17 9:49am    
Thank you, helped a lot

1 solution

Here is a Cinema data model that might be of interest to you: Cinema Bookings Data Model[^]
This one is for theatres, but misses an important comment about table usage: Data Model for Theater Bookings[^]
What database are you using ?
 
Share this answer
 
v2

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