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 04-20-2009, 10:20 AM Tables to big?
Junior Talker

Posts: 1
Name: Rob
Trades: 0
Hello,

I want to make a database for a website. The visitor of this website can search a hostal in our area and look at the description and photo's.

I have these tables now:
- Table Username: username, password for hostal owner to log in to register or change the data of his hostal
- Table HostalName: HostelID, name hostal, adres, phonenumber, email, name of owner e.g.
- Table Hostal: HostelID, description, photo's, a lot of facilities (about 100 YES/NO-fields in database)
- Table Rooms: HostalID, DescriptionRoom1, PhotoRoom1, FacilitiesRoom1 (about 10 YES/NO-fields), DescriptionRoom2, PhotoRoom2, FacilitiesRoom2 (this can go up to 10 rooms) e.g
- Table Recommandations: HostalID, scores given by visitors that have visited the hostal

My questions:
Is this a logical setup?
Is the table Rooms to big: if a hostal has 10 rooms the amount of colums wil be more then 100. Is this a problem? Is it better to make a table for each room?

Thanx
Rob
Robbbbbbbbbb is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 04-25-2009, 10:26 AM Re: Tables to big?
badams's Avatar
Skilled Talker

Latest Blog Post:
Dum Skype Firefox plugin
Posts: 69
Name: Barry Adams
Location: London
Trades: 0
It would be best to have a generic table for each Room

Room: RoomID, RoomNumber, HostalID, Description, Photo, Factilities

Not have multiple columns for each room in the Hotel, that what rows are for.

Dont forgot that each table should have a unique numerical id, for the database to
work with.

int RoomID primary key auto_increment

Are your Photos going to be Blobs in the database, or string pointing to files on your server
(i suggest strings)

Username might want to include a user type, in case you have different class of users.

Barry
SQL Programming Feed @ Feed Distiller
badams is offline
Reply With Quote
View Public Profile Visit badams's homepage!
 
Reply     « Reply to Tables to big?
 

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 0.10666 seconds with 12 queries