建议选择酒店管理系统的数据库设计 [英] suggestion reguarding the database design for a hotel management system

查看:107
本文介绍了建议选择酒店管理系统的数据库设计的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨每一个人,



感谢大家帮助我这些日子,当我在编码时卡住了!!

但是伙计们在数据库设计方面,我是一个新手,我非常有兴趣了解它是如何完成的。我打算设计一个样本酒店管理数据库。我打算在我的数据库中包含以下表格。



客户(cust_id,姓名,地址,电话号码,国家)

酒店:( hotl_id,名称,位置,国家)

分支:( brn_id,name,hotl_id)

菜单:(slno,菜,价格)

账单:(bill_no,Cust_id,价格,Supp_id)

预订:(cust_id,brn_id,checkin_date.Checkout_date)

员工(Staff_id,姓名,薪水,班次,隐藏)




我面临的问题是我不知道如何规范化这些表格。我甚至都不知道他们是否正常化了。任何人都可以帮助我吗?



如果有人能告诉我如何绘制ER图,我将不胜感激。



我想将客户与酒店和酒店联系起来,然后将工作人员分配给每个酒店,然后向客户开账单。但是我不知道这是否正确。



我也想知道如果一个表是标准化形式(第一个第二个或第三个等),怎么能理解。



先谢谢

Hi Every one,

Thank you all for helping me out these days when ever I was stuck while coding!!
however guys I'm a newbee when it comes to database design and I'm very much interested in learning how it is done. I'm planning to design a sample hotel management database. I am planning to have the following tables in my database.

customer(cust_id,name,address,phone number,country)
hotel:(hotl_id,name,Location,Country)
branches:(brn_id,name,hotl_id)
menu:(slno,dish,price)
bills:(bill_no,Cust_id,price,Supp_id)
booking:(cust_id,brn_id,checkin_date.Checkout_date)
staff(Staff_id,name,salary,shift,hid)


The problem that I'm facing is I do not know how to normalize these tables. I do not even know if they are normalized. Could any one help me with this?

I would appreciate if some one could tell me how to draw an ER diagram for this.

I thought to relate customer to hotel and hotel to branch then staff to each hotel and then bills to customers. However I do not know if that is correct.

I also want to know how can one understand if a table is in normalized form(1st 2nd or 3rd etc).

Thanks in Advance

推荐答案

我会尽量回答。但是请知道你所要求的是一个巨大的主题,需要几个月的时间来学习,练习和掌握。您可能想要从谷歌开始,并了解如何设计表,数据库和实体关系。有很多免费在线教程以及youtube上的视频。



您概述的表模式似乎已经足够规范化了。您可以在在线 [ ^ ]。还有很多免费的教程。请尽量不要理解每个普通形式,因为他们需要花费一些时间和经验才能真正理解。可以慢慢学习。



关于图表:不要混淆表架构图 [ ^ ],带有 ER图 [ ^ ]。它们是完全不同的东西,有时被不理解它们的人同义地使用。为了您的目的,您正在寻找表格模式图。



免费工具,如 Goodle Draw [ ^ ], Gliffy [ ^ ]和清晰的图表/ [ ^ ]如果你真的很方便没有MS Visio。



[请接受/投票给你的答案或解决方案以鼓励参与]
I will try to answer as much as I can. But please know that what you are asking is a huge subject in itself and needs months to study, practice and master. You may want to start by just doing a google and learn about how to design tables, databases and entity relationships. There are plenty of tutorials online for free as well as videos on youtube.

The table schema that you have outlined seem to be normalized enough. You can read about normalization and its advantages online[^]. Again there are plenty of tutorials for free. Please try not to understand every Normal Form straightaway, as they take a bit of time and experience to really make sense. It is okay to learn slowly.

Regarding diagrams: Do not confuse between a Table schema diagram[^] with an ER diagram[^]. They are totally different things and sometimes used synonymously by people who don't understand them. For your purpose a Table Schema diagram is what you are looking for.

Free tools such as Goodle Draw[^], Gliffy[^] and Lucid Chart/[^] can come really handy if you don't have MS Visio.

[Please accept/up-vote answers or solutions that work for you to encourage participation]


这篇关于建议选择酒店管理系统的数据库设计的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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