Re: Database Design and Bianry Operations

2003-10-20 Thread Mojtaba Faridzad
by 4 bytes number (as 1 field) , you can keep 32 bits (criteria). this shows how much you can save the space. but if the database is not huge, it's better to select simpler solution (one field for one criteria). this is an example in MySQL manual to show how to work with bits: The following shows

Re: Database Design and Bianry Operations

2003-10-14 Thread Mikhail Entaltsev
Hi, I would create one field (char(200) or char(255)) for all criteria. After that I will store: in the first byte of that string Y if hotel has swimming pool, N - doesn't have, Q - no idea in the second byte of that string Y if hotel has TV, N - doesn't have, Q - no idea in the third byte of

RE: Database Design and Bianry Operations

2003-10-14 Thread Kevin Gale
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

RE: Database Design and Bianry Operations

2003-10-14 Thread Tom Horstmann
Lee, 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. i think you should try to avoid such thing as much as you can. Storing more than one piece of data in a column