预约算法 [英] Reservation algorithm

查看:103
本文介绍了预约算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为

小餐馆开发预订管理系统。我坚持创建一个algorigthm来管理

预订。例如,我需要检查一个表是avaialbe

以及何时等我知道我需要一个包含

信息的数据库表有关餐厅餐桌的信息但是比这个还要好,所以任何帮助都会非常感激。

I''m in the process of developing a reservation management system for
small restaurants. I am stuck on creating an algorigthm for managing
the reservations. For example i need to check that a table is avaialbe
and when etc. I understand that i''ll need a database table containing
information about the tables in the restaurant but further than this im
pretty clueless so any help would be much appreciated.

推荐答案

Jimmy


联系我列表。您需要一名顾问来帮助您。你不能真的在这里计划这样的事情。


Kelly


" jimmy" < ja ************** @ tiscali.co.ukwrote in message

news:11 ************** ****** @ 48g2000cwx.googlegroup s.com ...
Jimmy

Contact me off list. You need a consultant to help you. You can''t really
plan something like this here.

Kelly

"jimmy" <ja**************@tiscali.co.ukwrote in message
news:11********************@48g2000cwx.googlegroup s.com...

我正在为
开发预订管理系统
小餐馆。我坚持创建一个algorigthm来管理

预订。例如,我需要检查一个表是avaialbe

以及何时等我知道我需要一个包含

信息的数据库表有关餐厅餐桌的信息但除此之外我还是非常无能为力,所以任何帮助都会非常感激。
I''m in the process of developing a reservation management system for
small restaurants. I am stuck on creating an algorigthm for managing
the reservations. For example i need to check that a table is avaialbe
and when etc. I understand that i''ll need a database table containing
information about the tables in the restaurant but further than this im
pretty clueless so any help would be much appreciated.



是的,这是,我已经完成了项目的其他部分(库存

管理并实际将预订存储在数据库中并且

搜索等)但是我无法理解如何做这个。


谢谢James

Yes this is, i have completed the other parts of the project (stock
management and actually storing the reservations in a database and
searching etc) but i cant get my head around how to do this.

Thanks James


jimmy写道:
jimmy wrote:

是的,我已经完成了项目的其他部分(库存

管理并实际将预订存储在数据库中并且

搜索等)但是我无法理解如何做到这一点。
Yes this is, i have completed the other parts of the project (stock
management and actually storing the reservations in a database and
searching etc) but i cant get my head around how to do this.



您可以将预订存储在数据库中吗?我假设你

有一些方法可以获得关于桌子的信息,比如

派对的数量,无论是摊位还是桌子,是否近在咫尺一个窗口或

不是,它是否接近舞台(如果有舞台)等等。所以

预订将是一个特定的表格时间?


那么,您如何设想该计划的运作?有人会打电话给

请求预订吗?如果他们要求在4个窗口附近找到一张桌子,那么晚上8点将会收到
,你将需要查询你的相关数据库中的表格

是否符合该描述。然后根据存储在

预订表中的数据,您可以检查当时该表是否已存在预订

。可能的数据库设置可能包括

以下内容:

DinnerTable(保存有关可用表格的信息)


Id int

容量int

类型int - 0 =表,1 =展位

NearWindow位

预订


Id int

DinnerTableId int --FK to Tables table

时间日期时间

持续时间int - 预订的长度

分钟


这些只是帮助你开始思考的简单例子。


您的查询必须能够确定哪些表是保留(或仍在使用)
,哪些表可能会被腾空,以及

哪些表是免费。


如果派对在晚上8点使用桌子并且有人打电话预订了晚上9点的那张

表,你可以把那个n作为预订,即使第一方可能会在晚上9点左右徘徊在桌子上吗?或者你会告诉

那个表是在晚上8点保留的,也可能不是免费的

正好在晚上9点他们可能要等到9:15?这些是需要考虑的事项。


您可能需要一种取消预订的方式。


将程序分解为小任务并开始解决每个

任务,同时牢记项目的所有要求。


希望有至少在这里有一些有用的信息来源

你。


祝你好运。

So you can store the reservations in the database? I assume that you
have some way to information about the tables such as number of
parties, whether it''s a booth or a table, whether it''s near a window or
not, whether it''s close to the stage (if there is a stage), etc. So a
reservation would be a table for a specific time?

So, how do you envision the program working? Will someone call to
request a reservation? If they ask for a table for 4, near a window,
for 8:00pm, you will have to query your associated database for a table
that matches that description. Then based on the data stored in the
reservations table, you can check to see if a reservation already
exists for that table at that time. A possible db setup might include
the following:

DinnerTable (holds information about the available tables)

Id int
Capacity int
Type int -- 0 = table, 1 = booth
NearWindow bit
Reservations

Id int
DinnerTableId int --FK to Tables table
Time datetime
Duration int --Length of the reservation in
minutes

These are only simple examples to help you start thinking.

Your queries would have to be able to figure out which tables are
reserved (or still in use), which tables are likely to be vacated, and
which tables are free.

If a party is using a table at 8:00pm and someone calls to reserve that
table for 9:00pm, can you put that down as a reservation even though
the first party might linger at the table past 9pm? Or would you tell
the caller that that table is reserved for 8pm and it might not be free
exactly at 9pm and that they may have to wait until 9:15? These are
things to consider.

And you''ll probably need a way to cancel a reservation.

Break the program into small tasks and begin solving each of those
tasks, keeping in mind all of the requirements for the project.

Hope there is at least some useful nuggets of information in here for
you.

Good Luck.

这篇关于预约算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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