救命!餐馆数据库最后阶段的问题 [英] Help! Problem on the final stage of a restaurant database

查看:46
本文介绍了救命!餐馆数据库最后阶段的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在建一个餐馆数据库(这比我之前想象的要好得多!),现在它来到了最后阶段,我遇到了一个

的问题。我会详细解释一下。在一家餐馆,虽然很少,但是它发生了,来自desk1的一个人想要支付桌子1的账单。

和desk2(我避免使用Access术语 ;表格),这意味着之前由desk1和desk2单独订购的菜肴现在必须在桌面1或桌面2下一起混合




例如,在桌面1下面订购了以下菜肴:


订单ID订单详情IDDEDID价格数量

discont

759 456披萨brocoli 219,00 1 0,00%

759 457披萨那不勒斯129,00 2 0,00%

759 458披萨火腿109,00 1 0,00%

759 459香烟65,00 1 0,00%

和桌子2:


OrderID OrderDetailID DishID价格数量

discont

760 460披萨brocoli 219,00 1 0,00%

760 461披萨火腿109,00 1 0,00%
760 462香烟85,00 1 0,00%

760 463葡萄酒250,00 1 0,00%

当它们混合在一起时, tblOrderDetail是

的来源frmOrder上的子表格理论上可以是这样的:

OrderID OrderDetailID DishID价格数量

discont

759 456 Pizza brocoli 219,00 1 0,00%

759 457 Pizza Napoli 129,00 2 0,00%

759 458 Pizza Ham 109, 00 1 0,00%

759 459香烟65,00 1 0,00%

759 460 Pizza brocoli 219,00 1 0,00%

759 461比萨火腿109,00 1 0,00%

759 462香烟85,00 1 0,00%

759 463葡萄酒250,00 1 0,00%

我来到这一步,但实际上用户喜欢的更多是

否-repeat-DishID版本,每个菜肴的数量加在一起

,注意香烟有不同的价格(65.00和85.00),

因为香烟的价格(葡萄酒也是如此)经常变化

香烟没有固定价格:


OrderID订单详细信息ID DishID价格数量
discont

759 456 Pizza brocoli 219,00 2

0,00%

759 457 Pizza Napoli 129,00 2

0,00 %

759 458比萨火腿109,00 2

0,00%

759 459香烟65,00 1

0,00%

759 462香烟85,00 1

0,00%

759 463葡萄酒250,00 1

0,00%


感谢您的时间和耐心,我几天来一直非常努力地工作了几天,但是仍然没有找到解决问题的好方法。任何

你的帮助将不胜感激。


Paul

Hello,

I am making a restaurant database (it is much more complicated than I
thought before!), now it comes to the last stage and I come across a
problem. I will explain it in detail. In a restaurant, though rarely, but it
happens, that one guy from desk1 would like to pay for bills of both desk1
and desk2 (I avoid using Access term "table"), that means the dishes that
ordered seperately before by desk1 and desk2 now have to be commixed
together under desk1 or desk2.

for example, there are following dishes ordered, under desk1:

OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 1 0,00%
759 457 Pizza Napoli 129,00 2 0,00%
759 458 Pizza Ham 109,00 1 0,00%
759 459 Cigarette 65,00 1 0,00%
and under desk2:

OrderID OrderDetailID DishID price quantity
discont
760 460 Pizza brocoli 219,00 1 0,00%
760 461 Pizza Ham 109,00 1 0,00%
760 462 Cigarette 85,00 1 0,00%
760 463 Wine 250,00 1 0,00%
when they are commixed together, the tblOrderDetail which is the source of
the subform on the frmOrder could theoretically look like:
OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 1 0,00%
759 457 Pizza Napoli 129,00 2 0,00%
759 458 Pizza Ham 109,00 1 0,00%
759 459 Cigarette 65,00 1 0,00%
759 460 Pizza brocoli 219,00 1 0,00%
759 461 Pizza Ham 109,00 1 0,00%
759 462 Cigarette 85,00 1 0,00%
759 463 Wine 250,00 1 0,00%
I came to this step, however practically what the users like more is a
no-repeat-DishID version, and each dishs'' quantity added together
respectively, note that Cigarette has different prices (65.00 and 85.00),
because the price of the cigarettes (so is the wine) is changing so often
that the cigarettes don''t have their fixed prices:

OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 2
0,00%
759 457 Pizza Napoli 129,00 2
0,00%
759 458 Pizza Ham 109,00 2
0,00%
759 459 Cigarette 65,00 1
0,00%
759 462 Cigarette 85,00 1
0,00%
759 463 Wine 250,00 1
0,00%

thank you for your time and your patience, I have been working very hard for
several days, but still haven''t found a good solution to the problem. Any of
your help will be greatly appreciated.

Paul

推荐答案

您是否尝试使用按项目ID分组的求和查询(我想

Pizza Ham有ID 123或类似的东西)?


" Paul T.RONG <等*** @ hotmail.com>在消息中写道

news:Ut ***************** @ news.chello.at ...
Have you tried using a summation query that groups by item ID (I suppose
Pizza Ham has ID 123 or something like that)?

"Paul T. RONG" <et***@hotmail.com> wrote in message
news:Ut*****************@news.chello.at...
你好,

我正在建一个餐馆数据库(它比我以前想的要复杂得多!),现在它到了最后阶段,我遇到了一个问题。我会详细解释一下。在一家餐馆,虽然很少,但是发生了
,来自desk1的一个人想要支付desk1
和desk2的账单(我避免使用Access termtable),这意味着在desk1和desk2之前单独订购的菜肴现在必须在桌面1或桌面2下一起混合。

例如,在桌子1下面订购了以下菜肴:

OrderID订单详细信息ID DishID价格数量
discont
759 456 Pizza brocoli 219,00 1
0,00%759 457 Pizza Napoli 129,00 2
0, 00%759 458比萨火腿109,00 1
0,00%759 459香烟65,00 1
0,00%

并且在桌子2下:

OrderID OrderDetailID DishID价格数量
discont
760 460 Pizza brocoli 219,00 1
0,00%760 461披萨火腿109,00 1
0,00%760 462香烟85,00 1
0,00%760 463葡萄酒250,00 1
0,00%

当它们混合在一起时,tb​​lOrderDetail是frmOrder上子表单的来源,理论上可以看起来像:

OrderID OrderDetailID DishID价格数量
discont
759 456 Pizza brocoli 219,00 1
0,00%759 457 Pizza Napoli 129,00 2
0,00%759 458 Pizza Ham 109,00 1
0,00%759 459 Cigarette 65,00 1
0,00%759 460 Pizza brocoli 219,00 1
0,00%759 461 Pizza Ham 109,00 1
0, 00%759 462香烟85,00 1
0,00%759 463 Wine 250,00 1
0,00%

我来到这一步,但实际上用户更喜欢的是一个
no-repeat-DishID版本,每个菜肴的数量分别加在一起
请注意,香烟有不同的价格(65.00和85.00),因为香烟的价格(葡萄酒也是如此)经常变化
香烟没有固定价格:

订单ID订单详情IDDEDID价格数量
分包
759 456比萨饼干219,00 2
0,00%
759 457披萨那不勒斯129,00 2
0,00%
759 458披萨火腿109,00 2
0,00%
759 459香烟65,00 1
0,00%
759 462香烟85,00 1
0,00%
759 463葡萄酒250, 00 1
0,00%

感谢您的时间和耐心,我已经非常努力地工作了几天,但仍然没有找到好处解决问题的方法。任何
的帮助将不胜感激。

Paul
Hello,

I am making a restaurant database (it is much more complicated than I
thought before!), now it comes to the last stage and I come across a
problem. I will explain it in detail. In a restaurant, though rarely, but it happens, that one guy from desk1 would like to pay for bills of both desk1
and desk2 (I avoid using Access term "table"), that means the dishes that
ordered seperately before by desk1 and desk2 now have to be commixed
together under desk1 or desk2.

for example, there are following dishes ordered, under desk1:

OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 1 0,00% 759 457 Pizza Napoli 129,00 2 0,00% 759 458 Pizza Ham 109,00 1 0,00% 759 459 Cigarette 65,00 1 0,00%

and under desk2:

OrderID OrderDetailID DishID price quantity
discont
760 460 Pizza brocoli 219,00 1 0,00% 760 461 Pizza Ham 109,00 1 0,00% 760 462 Cigarette 85,00 1 0,00% 760 463 Wine 250,00 1 0,00%

when they are commixed together, the tblOrderDetail which is the source of
the subform on the frmOrder could theoretically look like:
OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 1 0,00% 759 457 Pizza Napoli 129,00 2 0,00% 759 458 Pizza Ham 109,00 1 0,00% 759 459 Cigarette 65,00 1 0,00% 759 460 Pizza brocoli 219,00 1 0,00% 759 461 Pizza Ham 109,00 1 0,00% 759 462 Cigarette 85,00 1 0,00% 759 463 Wine 250,00 1 0,00%

I came to this step, however practically what the users like more is a
no-repeat-DishID version, and each dishs'' quantity added together
respectively, note that Cigarette has different prices (65.00 and 85.00),
because the price of the cigarettes (so is the wine) is changing so often
that the cigarettes don''t have their fixed prices:

OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 2
0,00%
759 457 Pizza Napoli 129,00 2
0,00%
759 458 Pizza Ham 109,00 2
0,00%
759 459 Cigarette 65,00 1
0,00%
759 462 Cigarette 85,00 1
0,00%
759 463 Wine 250,00 1
0,00%

thank you for your time and your patience, I have been working very hard for several days, but still haven''t found a good solution to the problem. Any of your help will be greatly appreciated.

Paul



11月23日星期二2004年23:12:52 GMT,Paul T. RONG < et *** @ hotmail.com>

写道:


我可能会添加一个转移功能,其中一个或多个OrderDetailID可以从一个订单转移到另一个订单。通过这种方式,客户只需支付另一台服务台的葡萄酒或整个账单即可支付


转移OrderDetailID就像给它一个不同的一样简单

OrderID。


< clip>

On Tue, 23 Nov 2004 23:12:52 GMT, "Paul T. RONG" <et***@hotmail.com>
wrote:

I might add a "Transfer" feature, where one or more OrderDetailIDs can
be transfered from one order to another. This way a customer can pay
for only the bottle of wine of the other Desk, or for the entire bill.
Transferring an OrderDetailID is as simple as giving it a different
OrderID.

<clip>


Paul,
在我们的餐厅,收银员接受培训,可以将每个标签作为单个

交易处理。因此,如果乔伊带着他和他的好友

标签来到收银台,那么她会做两次交易,每个标签一次。你确实在

系统分析中得到了一个点,其中编写一个特征的工作成本不能通过好处来证明是合理的。一个优秀的收银员应该能够优雅地处理这个而不需要编码任何东西。

另外,请记住餐厅本质上是一个工厂的

信息系统需要支持的业务流程。在

工厂订单进入并分配资源以填写订单。它确实发生了没有足够的组件来填充所有

订单的
。这意味着订单的某些部分可以完成生产,而其他部分必须按顺序进行,直到有足够的库存来完成订单。客户还会打电话给

工厂,询问是否可以将多个订单放在一张提单上并一起发货

。您的运输人员可能会发现客户有一些

订单,这些订单在某一天因生产而可能会在同一辆卡车上运行

因此应该在相同的账单上提单。在这些情况下,它是

货物,这是发票将生成的分组。

我是你的老板我会说这是最好的一个对人类。您可以使用另一篇文章中提到的
编写合并票证功能。但我想知道这笔努力是否值得。一旦合并了一张票,你将失去

的能力,看看合并的票和你的厨师订购了什么,并且

sous-chef在分析时可能会觉得很烦人

企业如何按照每张桌子或每张订单进行操作。


" Paul T. RONG" <等*** @ hotmail.com>在消息中写道

news:Ut ***************** @ news.chello.at ...
Paul,
At our restaurant the cashier is trained to handle each tab as a single
transaction. So if Joey comes up to the cashier with his and his buddies
tab she does two transactions, one for each tab. You do get to a point in
systems analysis where the cost of the work to code a feature can''t be
justified by the benefits. A good cashier should be able to gracefully
handle this without having to code anything.
Also, remember that a restaurant is essentially a factory in terms of the
business processes that an information system needs to support. In a
factory orders come in and resources get allocated to fill the orders. It
does happen that there are not enough components on hand to fill all the
orders. This means that it is possible for portions of an order to complete
production while other portions have to go on back-order until there is
sufficient inventory to complete the order. Customers will also call the
plant and ask if several orders can be put on one bill of lading and shipped
together. Your shipping people may recognize that a customer has several
orders due out of production on a given day that could go on the same truck
and thus should be on the same bill of lading. In these cases it is the
shipment that is the grouping upon which an invoice will be generated.
Were I your boss I''d say that this is one best left to the humans. You
could code a merge ticket feature as mentioned in another post. But I
wonder if the effort is worth it. Once a ticket is merged you lose the
ability to see what was ordered on the merged ticket and your chef and
sous-chef might find that irritating when it comes to analyzing how the
business is doing per table or per order.

"Paul T. RONG" <et***@hotmail.com> wrote in message
news:Ut*****************@news.chello.at...
你好,

我正在建一个餐馆数据库(它比我以前想的要复杂得多!),现在它到了最后阶段,我遇到了一个问题。我会详细解释一下。在一家餐馆,虽然很少,但是
它发生了,来自desk1的一个人想要支付Desk1
和desk2的账单(我避免使用Access termtable) ,这意味着桌面1和桌面2之前单独订购的菜肴现在必须在桌面1或桌面2下面一起混合。

例如,有以下菜肴,在desk1:

OrderID订单详细信息ID DishID价格数量
discont
759 456披萨brocoli 219,00 1
0,00%
759 457 Pizza Napoli 129, 00 2
0,00%
759 458比萨火腿109,00 1
0,00%
759 459香烟65,00 1
0,00%

和桌面2:

订单ID订单详情IDDEDID价格数量
分配
760 460 Pizza broco li 219,00 1
0,00%
760 461披萨火腿109,00 1
0,00%
760 462香烟85,00 1
0, 00%
760 463葡萄酒250,00 1
0,00%

当它们混合在一起时,tb​​lOrderDetail是
子形式的源头frmOrder在理论上可能看起来像:

OrderID订单详情IDDEDID价格数量
discont
759 456披萨brocoli 219,00 1
0,00%
759 457 Pizza Napoli 129,00 2
0,00%
759 458比萨火腿109,00 1
0,00%
759 459香烟65,00 1
0 ,00%
759 460 Pizza brocoli 219,00 1
0,00%
759 461比萨火腿109,00 1
0,00%
759 462香烟85,00 1
0,00%
759 463葡萄酒250,00 1
0,00%

我来到这里然而,实际上用户更喜欢的是一个
no-repeat-DishID版本,并且每个碟子的数量分别加在一起
,请注意Cigarette有不同的价格(65.00和85.00),
订单ID订单详细信息含税价格数量 discont
759 456 Pizza brocoli 219,00 2
0,00%
759 457 Pizza Napoli 129,00 2
0,00%
759 458比萨火腿109,00 2
0,00%
759 459香烟65,00 1
0,00%
759 462香烟tte 85,00 1
0,00%
759 463葡萄酒250,00 1
0,00%

感谢您的时间和耐心,我几天来一直在努力工作
,但仍然没有找到解决问题的好办法。任何
的帮助将不胜感激。

Paul
Hello,

I am making a restaurant database (it is much more complicated than I
thought before!), now it comes to the last stage and I come across a
problem. I will explain it in detail. In a restaurant, though rarely, but
it
happens, that one guy from desk1 would like to pay for bills of both desk1
and desk2 (I avoid using Access term "table"), that means the dishes that
ordered seperately before by desk1 and desk2 now have to be commixed
together under desk1 or desk2.

for example, there are following dishes ordered, under desk1:

OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 1
0,00%
759 457 Pizza Napoli 129,00 2
0,00%
759 458 Pizza Ham 109,00 1
0,00%
759 459 Cigarette 65,00 1
0,00%
and under desk2:

OrderID OrderDetailID DishID price quantity
discont
760 460 Pizza brocoli 219,00 1
0,00%
760 461 Pizza Ham 109,00 1
0,00%
760 462 Cigarette 85,00 1
0,00%
760 463 Wine 250,00 1
0,00%
when they are commixed together, the tblOrderDetail which is the source of
the subform on the frmOrder could theoretically look like:
OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 1
0,00%
759 457 Pizza Napoli 129,00 2
0,00%
759 458 Pizza Ham 109,00 1
0,00%
759 459 Cigarette 65,00 1
0,00%
759 460 Pizza brocoli 219,00 1
0,00%
759 461 Pizza Ham 109,00 1
0,00%
759 462 Cigarette 85,00 1
0,00%
759 463 Wine 250,00 1
0,00%
I came to this step, however practically what the users like more is a
no-repeat-DishID version, and each dishs'' quantity added together
respectively, note that Cigarette has different prices (65.00 and 85.00),
because the price of the cigarettes (so is the wine) is changing so often
that the cigarettes don''t have their fixed prices:

OrderID OrderDetailID DishID price quantity
discont
759 456 Pizza brocoli 219,00 2
0,00%
759 457 Pizza Napoli 129,00 2
0,00%
759 458 Pizza Ham 109,00 2
0,00%
759 459 Cigarette 65,00 1
0,00%
759 462 Cigarette 85,00 1
0,00%
759 463 Wine 250,00 1
0,00%

thank you for your time and your patience, I have been working very hard
for
several days, but still haven''t found a good solution to the problem. Any
of
your help will be greatly appreciated.

Paul



这篇关于救命!餐馆数据库最后阶段的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆