I am designing a database for a client that will provide catering, food and also shishas.
The orders that your customers can make are for food, shishas or catering, but they are never mixed between them, that is, you can order food but not shishas in the same order, it is as if they were three independent businesses.
Also, for the catering I need to pick up the staff that will be sent to carry out the service.
I thought I could create a table Pedido
where I store the id
, the , fecha
and the cliente
requester.
The problem is that I don't know how to design the rest, whether to create a table of comida
, another of shisha
and another of catering
, in which to store each one of the elements of the order in particular, relating it to the tablePedido
The problem would be that when my client asks me to know which is the order that has cost the most money among all (food, shishas and catering), I would need to make three different queries.
My question is: can I design the DB in some way in which this query can be performed?