Re: php & mysql ... hotel --> unefficient
| From: | Daniel Convissor | Date: | Fri, 04 Aug 2000 09:18:12 +0000 |
| Subject: | Re: php & mysql ... hotel --> unefficient | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-10095@lists.php.net to get a copy of this message | ||
gstrein andreas wrote:
>
> we've got a solution for hotel-room avialibility.
>
> to know if a room is vacant we use a column
> in our database. rack CHAR (730)
>
> 0 ..... indicates no room free
> 1 ..... indicates one room free
> 2 ..... indicates two rooms free
>
> and so on
>
> this gives us a very easy way to determine if
> a room is free or not using the mid function in the
> sql-statement.
>
> but we are still looking for a way to store the information
> in a more efficient way.
>
> now we have:
>
> 000010100113423333322222000022222223333333331111111 ...... and so on
What the heck?! That seems like a crazy database structure. I don't know
your whole situation, so can't recommend a better structure. Check out this
tutorial on database design:
http://www.utexas.edu/cc/dbms/utinfo/relmod/normal1.html
If you need a hired hand, drop me a line.
--Dan
--
T H E A N A L Y S I S A N D S O L U T I O N S C O M P A N Y
More than just answers. Solutions. (SM)
http://www.analysisandsolutions.com/
4015 7 Av #4, Brooklyn NY 11232 v: 718-854-0335 f: 718-854-0409