Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

The Database Forum


You are currently viewing our The Database Forum as a guest. Please register to participate.
Login



Reply
Old 11-17-2009, 06:53 PM Database structure
Junior Talker

Posts: 1
Trades: 0
Hi everybody!!
i must create a database for a bed and breakfast!!!!!!
- there are different types of rooms : family, double & simple
- In certains rooms, the client can smoke but not in all rooms
- there is a breakfast on a print car and clients can choose what they want
- There are different kind of menus : Vegans, vegetarians, nut allergies
- In menu, we also can find juice, coffee, tea
- Clients can order menu if there are not expensive
- For foreign clients, the passeport number must be asked
- For the booking, clients choose the type of room, type of menu
- le B&B récompense les fidèles clients

Table Client (ClientId , FirstName, lastName, Adress, Postal Code, Country, Phone, PaiementId)
Table Room (RoomNumber, TypeRoom, Price)
Table BookingRoom(RoomNumber,CLientId, DateBeginning, DateEnd,)
Table Paiment (PaimentId, Type, Date,)
Table BreakfastList?
Table BreakfastClient?
table Price?? I am not sur

What do you think about a such database??
Do you see any problems in this structure?
anything I should have done differently?
anything I could do to improve database performance?

All comments will be appreciated!!
Thanks
scoubida42 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 11-19-2009, 10:07 AM Re: Database structure
Super Talker

Posts: 139
Name: John Davis
Trades: 0
1. In case if client can book only one room then you may to merge Table Client and Table BookingRoom and Table Paiment + BreakfastId from Table BreakfastList + passport number for foreign clients + comment from client

2. I suppose you have to add some infomation columns to Table Room (like chair number)

3. I'm not sure that table Price required because of price depends from previous choise set.
__________________
»
Please login or register to view this content. Registration is FREE
- Interactive maps for websites
»
Please login or register to view this content. Registration is FREE
for web developers
MapMaster is offline
Reply With Quote
View Public Profile Visit MapMaster's homepage!
 
Old 11-19-2009, 11:25 AM Re: Database structure
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
Your schema is not normalized enough.
Try this one:


For the part that says:
Quote:
- Clients can order menu if there are not expensive
- For foreign clients, the passeport number must be asked
- le B&B récompense les fidèles clients
will be things to handle in the core logic, not in the DB.

As for
Quote:
- In certains rooms, the client can smoke but not in all rooms
I'd put that as attribute of a room, and in the page displaying the booking options, you would need to display it to the customer.

Don't hesitate to ask if you have questions.
I crafted the schema in less than 5 minutes at work (while compiling), so it may have flaws I've missed, but the base should be good.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to Database structure
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 4.07161 seconds with 12 queries