Its nothing but request/response game.
If you note in case of flight. In the brouwser, in his/her pc, user chose flight, class, date of travel, then u press submit
Now that submitted parameters are send to page on the server
so server use this parameters to query database that how much seats avaialble for that particular day for that flight.
Now server sends response back to the user to his/her browser with the status.
If you book ticket same flight, date, class is updated by one seat in database. so next request will get 1 less seat now.
urtrivedi
Posting Virtuoso
1,714 posts since Dec 2008
Reputation Points: 299
Solved Threads: 362
Skill Endorsements: 24
The only thing you have to be aware of is concurrent users. If there are only a few places left and you're half way through a booking, it would be an amazing shame if when you get to the 'confirm' button, that it tells you 'tough luck' as somebody half way across the world was a millisecond quicker than you.
There are ways to deal with this, but you'll need to research it.
diafol
Keep Smiling
10,666 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,514
Skill Endorsements: 57
The only thing you have to be aware of is concurrent users. If there are only a few places left and you're half way through a booking, it would be an amazing shame if when you get to the 'confirm' button, that it tells you 'tough luck' as somebody half way across the world was a millisecond quicker than you.
There are ways to deal with this, but you'll need to research it.
Yes if 2 persons get same seat then one have to travel by sitting on anothers lap
urtrivedi
Posting Virtuoso
1,714 posts since Dec 2008
Reputation Points: 299
Solved Threads: 362
Skill Endorsements: 24
If you want to access remote database that is not in your control or your office, they remote owner must give some API access with manuals, so that you know what to pass and how to retrived infomation from that server.
urtrivedi
Posting Virtuoso
1,714 posts since Dec 2008
Reputation Points: 299
Solved Threads: 362
Skill Endorsements: 24
The remote DB may be accessed if you have the remote hostname and if you the DB server allows permission. As a rule, you can get the details and set up permissions in cPanel or similar. Whether postgresql or mysql, shouldn't really matter.
diafol
Keep Smiling
10,666 posts since Oct 2006
Reputation Points: 1,628
Solved Threads: 1,514
Skill Endorsements: 57