| | |
rest. menu table design
Please support our MS Access and FileMaker Pro advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Nov 2008
Posts: 3
Reputation:
Solved Threads: 0
I have a busted five table design for a food item guest ticket . Here are the names(Actual) of those tables: GuestTicketType, GuestTicket, GuestTicketOrderCategory, GuestTicketOrder & GuestTicketPayment.
The incomplete(busted) design looks like this: guesttickettype has a field named guesttype, which is one of three guest types: dinein, takeout, delivery.
The guestticket table holds the personal info like the first and last name on the ticket and the relevant data. The guestticketordercategory holds an ordercategory field that uses 7 different food item options: pizza, subs, salads, beverages, desserts, sides and addons. My first inclination was to set the two pre-populated tables (guesttickettype and guestticketordercategory) to hang off the guestticket table and the guestticketorder table, respectively. Not sure if that works or not....
I don't know how to set the tables properly, however, i do know the end game. Each guest should have an order and a payment to each ticket. Does that make sense?
My question, then, is what is the best way to accomplish that, either with the present setup or some other variation based on your recommendation?
Thank you for much needed help!
The incomplete(busted) design looks like this: guesttickettype has a field named guesttype, which is one of three guest types: dinein, takeout, delivery.
The guestticket table holds the personal info like the first and last name on the ticket and the relevant data. The guestticketordercategory holds an ordercategory field that uses 7 different food item options: pizza, subs, salads, beverages, desserts, sides and addons. My first inclination was to set the two pre-populated tables (guesttickettype and guestticketordercategory) to hang off the guestticket table and the guestticketorder table, respectively. Not sure if that works or not....
I don't know how to set the tables properly, however, i do know the end game. Each guest should have an order and a payment to each ticket. Does that make sense?
My question, then, is what is the best way to accomplish that, either with the present setup or some other variation based on your recommendation?
Thank you for much needed help!
From what I can make from your description and table names, here are the fields I would use:
GuestTicket: ID, GuestTicketType (FK), Name, etc
GuestTicketOrder: ID, GuestTicket (FK), GuestTicketOrderCategory (FK)
GuestTicketPayment: ID, GuestTicket (FK), etc
Please note that this allows each ticket to have several Orders and several Payments. Another design that would work is the following:
GuestTicket: ID, GuestTicketType (FK), GuestTicketOrder (FK), GuestTicketPayment (FK), Name, etc
GuestTicketOrder: ID, GuestTicketOrderCategory (FK)
GuestTicketPayment: ID, etc
Please note that the second design allows each ticket to have only one order and only one payment. The design really comes down to what type of relationship you need between ticket, order and payment and the direction of the relationship. The most general case would be a many-to-many relationship, which I did not list.
GuestTicket: ID, GuestTicketType (FK), Name, etc
GuestTicketOrder: ID, GuestTicket (FK), GuestTicketOrderCategory (FK)
GuestTicketPayment: ID, GuestTicket (FK), etc
Please note that this allows each ticket to have several Orders and several Payments. Another design that would work is the following:
GuestTicket: ID, GuestTicketType (FK), GuestTicketOrder (FK), GuestTicketPayment (FK), Name, etc
GuestTicketOrder: ID, GuestTicketOrderCategory (FK)
GuestTicketPayment: ID, etc
Please note that the second design allows each ticket to have only one order and only one payment. The design really comes down to what type of relationship you need between ticket, order and payment and the direction of the relationship. The most general case would be a many-to-many relationship, which I did not list.
I am just curious: which method did you end up using? Each of the methods I mentioned supports different requirements, i.e. each ticket only has one order, each ticket can have several orders, etc.
•
•
Join Date: Nov 2008
Posts: 3
Reputation:
Solved Threads: 0
I used the first version. I apologize for not stating the entire specifics of my needs. I should have said this:
Each guest ticket can have more than one order item and of course more than one payment. A guest ticket that only supports a single order wouldn't clearly depict the actual ticket. The ticket would be fragmented using the second option and incoherent, would it not?
May I ask you if you thought the table names were coherent and clearly suited for the intended purpose? Did I leave anything out that should have been inlcuded?
Thanks again for your help.
Each guest ticket can have more than one order item and of course more than one payment. A guest ticket that only supports a single order wouldn't clearly depict the actual ticket. The ticket would be fragmented using the second option and incoherent, would it not?
May I ask you if you thought the table names were coherent and clearly suited for the intended purpose? Did I leave anything out that should have been inlcuded?
Thanks again for your help.
![]() |
Similar Threads
- memory management in wndows 2000 (Windows NT / 2000 / XP)
Other Threads in the MS Access and FileMaker Pro Forum
- Previous Thread: Should Workers Get Paid for Bootup Time?
- Next Thread: SQL moving data error
| Thread Tools | Search this Thread |





