I am doing a database project for Uni and am trying to figure out how a 'Pay at Table' app would work for restaurants. I Have found this example company that does this https://readytopay.com/ but i cant figure out how they have set up their databases.

My best Guess is that they connect to the restaurant POS API, from this they use an Ajax call to pull data from each table at the restaurant and duplicate it into their own tables. So they would have;

  Restaurant_ID . PK

  table_ID . PK
  Restaurant_ID . FK
  API endpoint (API endpoint for that table in restaurant POS)

  Bill_ID . PK
  Restaurant_ID . FK
  Table_ID . FK
  Food Item (Pulled From API)
  Food Price (Pulled From API)
  Quantity (Pulled From API)
  Payment Status (has the item been paid for yet)

I presume that hey would need some way to send data back to the restaurants API to tell it that certain items have been paid for with the app.

If anyone has an idea of wha the best way to go about this and how the tables should be set up would be please let me know. any help would be appreciated.


Looks like you're already of with a good start. May I suggest that you first look at your requirements, that should guide what you should do rather than what others did. Let me comment on the table design you provided from my time working at PoC systems not knowing if this for a restaurant, restaurant group, or a fast food chain as the later has no waiters and you pay as you order so no need to track it's status:

  • are you really in need to have a mix of restaurants?
  • also, any one with access can view the data of other restaurants… perhaps that violates the law you might have to separate them in separate databases.
  • allergies reported by the customer (you might have 3x the same menu item's with "modifications") the restaurant might be liable if you give the wrong plate of "menu A" to a client
  • You would normally have 1-N of waiter that serve the table
  • You could have a seat number, makes it easy when Distribution the ordered foods as well as splitting the bill
  • You seem to not have covered the payments in your tables. normally this would involve partial payments the bill may be split or parts paid in cash, credit card, debit card, or assigned to room or running tab.
  • You're not having a reservation status
  • You're not Handling clients joining tables,
  • You're not handling clients changing tables (perhaps they like to join some one or move becouse they like another table better)
  • Manage waiter changes becouse they moved tables or the waiters shift ended.

Does this help?

| improve this answer | |
  • Hi @PPann, thanks for your answer. The product will only need to deal with settling bills from the customers perspective. They will be bale to split the bill, pay their share etc by selecting food items that they have eaten. Could you comment on the use of Bills table? I do not know if it is the correct way to go about it by lumping all of the food items together like that. – Bell Nov 1 '19 at 12:04
  • @bell, sure looks okey you might be missing individual VAT/Sales Tax if those are in scope. the business key is missing I guess Restaurant+Table+Date makes it unique. That's what you would use as a human, "you sat at our London restaurant on table 2 on Monday the 22nd at 13:pm" you might add a duration property so you can work with that. some restaurants have "free food" but you rent a seat, the "all you can eat" type of deals – Walter Vehoeven Nov 1 '19 at 14:07
  • @bell as for splitting a bill you can duplicate the bill by creating a duplicate entry based on your technical key however we always did table.chair and used a decimal 4.2 (you can then have 99 tables with 99 chairs per table) we would start the chair count based on the door going clock-wize – Walter Vehoeven Nov 1 '19 at 14:14
  • please note that a some database systems expose stored procedures as web services so no coding needed (docs.oracle.com/cd/B14099_19/web.1012/b14027/plsqlservices.htm) – Walter Vehoeven Nov 1 '19 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.