hi every one. i am making a booking app in vb.net and im using sql server as my database. i am confused about table creation. I have increment of 1 in customerid which is primary key in customer table. Suppose if a customer books a room and according to the increment id"1" is assign to the 1st customer. Now after some days same customer again comes to the hotel and books for a room. Now this time a different id would be assign to the customer according the the increment may be id"125". What to do if i want to search the customer for how many booking has he done so far. Because there would be different id's assigned to the same customer as every time he walks in to book a room different id would be assign to him. And suppose if i make surname as my primary key than may be other people will have the same surname. I am very much confused how to solve this search problem for a specific customer for all bookings he has done so far. And if i give a unique id to customer my self suppose "cust1" than every time customer walks in he has to remember his id. PLease give some ideas what to do
Jump to Post
You will need to break out the information into more tables. You will need one table for registered guests (an id, their name, contact info, etc) and another for bookings. The bookings table will have a booking id and a guest id which links to the guest table. Then a …
All 3 Replies
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.