This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
Hi, I'm unclear about the 'booking', 1. Client have to provide a place for entering how may seats the customer want to take. Is this all that we need to implement? Or we also have to create another database which stores all the customer information like SSN, first name, whateven associated with the customer? 2. Since the client only book, that means, they should not have any buttons to add or remove any flight. What they can do is just update the available seat. If I am wrong, please correct me. 3. How do we handle commit? If a customer came by, he booked 4 seat in different flights, the agent hit confirm, the data goes to the server side, at the same time, another client also lock the same row to update the seat. Is that acceptable the first client hanging there for a while waiting for the second client finished its operation? Or any better idea how to handle in this case? Thanks in advance.
1. No you don't need another database. That information does not need to be save. 2. You are correct, the client only needs to modify the available seats. 3. Well, personally I had the second client wait till the record was unlocked. And barring a client losing connection between when he locks the record and before he unlocks it, the lock/read/modify/unlock happens rather quickly, so I wasn't worried that the client would wait to long. But, you will need to state this in your design.txt file to show that you took this into consideration. Mark