Lee.

Maybe others would disagree but they way I would handle this would be to
forget about storing the data in separate fields (or binary fields) and use
three tables.

Table1 - Facilities
A complete list of all criteria you want to record about the hotels

Table2 - Hotels
Table containing the hotel's basic details

Table3 - Hotel Facilities
Table allowing links to be made between hotels and facilities. There will be
one record for each facility for each hotel.


The advantage of the above is that you don't have to worry when it is time
to record new facilities or remove references to facilities as all you need
to do is insert/delete records from the relevant tables. I think storing the
facilities in separate fields or one field will make life difficult when
changing the data you wish to record. Searching is also easy as all you have
to do is perform a join across the relevant tables.


HTH
Kev.



> ----------
> From:         Lee Denny
> Sent:         Tuesday, October 14, 2003 14:17 PM
> To:   [EMAIL PROTECTED]
> Subject:      Database Design and Bianry Operations
> 
> Hello,
> 
> I'm after some advice on database design:
> 
> I've got an object - for an example a hotel - and I want to keep
> information
> about this hotel, criteria that it either has or hasn't (TV, swimming pool
> etc).
> 
> I want to search on criteria and return the most appropriate match.
> 
> Bearing in mind I've currently got over 200 criteria and want to expand
> this, how should approach the design of my criteria table.
> 
> Should I have a table with Hotel Id and then a char(1) (Y/N) field for
> each
> criteria and then a seperate look-up table for criteria name.
> 
> I get the feeling there is a more efficient method using binary operations
> (only one field populated with zeros and ones) but I can't find anything
> to
> help in the manuals.
> 
> Any thoughts?
> 
> Lee Denny
> 
> 
> -- 
> MySQL General Mailing List
> For list archives: http://lists.mysql.com/mysql
> To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]
> 
> 
> ________________________________________________________________________
> This e-mail has been scanned for all viruses by Star Internet. The
> service is powered by MessageLabs. For more information on a proactive
> anti-virus service working around the clock, around the globe, visit:
> http://www.star.net.uk
> ________________________________________________________________________
> 
> 

E-MAIL DISCLAIMER: The information in this email is confidential and may be legally 
privileged. It is intended solely for the addressee. Access to this email by anyone 
else is unauthorised. If you are not the intended recipient, any disclosure, copying, 
distribution or any action taken or omitted to be taken in reliance on it, is 
prohibited and may be unlawful. All information provided, including but not limited 
to, quotations, system specifications and suggestions concerning hardware/software 
(and services) configurations are strictly subject to our standard terms and 
conditions of business, copies of which are available on request.

________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to