Re: Help with database strategy

This WebDNA talk-list message is from

1998


It keeps the original formatting.
numero = 18086
interpreted = N
texte = Since I need to track actual inventory counts for each date on each hotel, I'm going to be forced into creating a database with several hundred fields per record I beleive. So my current strategy is to use a record per hotel and a single field per date. I think I've settled on using the numeric value of the date to label each inventory date field. So my database would look like the following: Hotel_ID 729909 729910 729911 729912 729913 729914 ...etc Hyatt 5 5 5 0 0 0 ...etc Ramada 15 6 8 24 0 36 ...etc ...etcWhere as the 729909 represents the # of days since 00/00/000 and the cells below represent that day's level of inventory per hotel.I've never used WebDNA to try to create the names of the fields to search in so excuse me if I'm screwing this all up... First I'd like to create a series of pull downs that would allow a user to constuct a start date for the search (June 04 1998) then I'd convert those pulldowns to a numeric value (7299090) which identifies the first field name to do a greater than 0 comparison. Now there would be another pulldown asking the customer to indicate how many total nights they would be staying (1-15). Any ideas on how to take that value and generate the additional field searches?In the case of the customer arriving on June 05 1998 and staying for three nights, I'd need to create code that would end up functioning like this:
So, how would I go about this? The initial required field seems pretty straightforward since I use the pulldowns and some date math to create that value, but I'm struggling with how to generate the second and third required fields based upon the value from the #of nights staying pulldown. Any ideas? Does this even make any sense to approach the problem in this fashion? As always TIA for the assistance -Marty > >You may find that a single field can hold a lot of information; for >instance, a single 365-character field can represent every day of the year, >where a T in position 67 means the room is available on day 67 of the >year. But depending on your searching needs, that may not be prudent. If >every room has 400 different amenities, then you may indeed need 400 >fields. But somehow I think those amenities are broken down into broad >categories that fit into relations better. Associated Messages, from the most recent to the oldest:

    
  1. Re: Help with database strategy (Larry Hewitt 1998)
  2. Re: Help with database strategy (Marty Schmid 1998)
  3. Re: Help with database strategy (PCS Technical Support 1998)
  4. Re: Help with database strategy (Kenneth Grome 1998)
  5. Re: Help with database strategy (Kenneth Grome 1998)
  6. Re: Help with database strategy (Matthew Steele 1998)
  7. Help with database strategy (Marty Schmid 1998)
Since I need to track actual inventory counts for each date on each hotel, I'm going to be forced into creating a database with several hundred fields per record I beleive. So my current strategy is to use a record per hotel and a single field per date. I think I've settled on using the numeric value of the date to label each inventory date field. So my database would look like the following: Hotel_ID 729909 729910 729911 729912 729913 729914 ...etc Hyatt 5 5 5 0 0 0 ...etc Ramada 15 6 8 24 0 36 ...etc ...etcWhere as the 729909 represents the # of days since 00/00/000 and the cells below represent that day's level of inventory per hotel.I've never used WebDNA to try to create the names of the fields to search in so excuse me if I'm screwing this all up... First I'd like to create a series of pull downs that would allow a user to constuct a start date for the search (June 04 1998) then I'd convert those pulldowns to a numeric value (7299090) which identifies the first field name to do a greater than 0 comparison. Now there would be another pulldown asking the customer to indicate how many total nights they would be staying (1-15). Any ideas on how to take that value and generate the additional field searches?In the case of the customer arriving on June 05 1998 and staying for three nights, I'd need to create code that would end up functioning like this: So, how would I go about this? The initial required field seems pretty straightforward since I use the pulldowns and some date math to create that value, but I'm struggling with how to generate the second and third required fields based upon the value from the #of nights staying pulldown. Any ideas? Does this even make any sense to approach the problem in this fashion? As always TIA for the assistance -Marty > >You may find that a single field can hold a lot of information; for >instance, a single 365-character field can represent every day of the year, >where a T in position 67 means the room is available on day 67 of the >year. But depending on your searching needs, that may not be prudent. If >every room has 400 different amenities, then you may indeed need 400 >fields. But somehow I think those amenities are broken down into broad >categories that fit into relations better. Marty Schmid

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

remotely creating and populating a stock inventory db -almost there! (1999) Error Messages Returned to User (1997) multiple record replace (2001) bug in Webcat OSX (1999) problems with 2 tags (1997) [WebDNA] try/except (2015) [search] in formulas.db (1997) unable to launch acgi in WebCat (1997) WebDNA Book? (2003) Misc Stuff That Might Help (1997) Site Search Concepts (2003) ShowIf & HideIf Question? (1998) Search in 2 or more catalogs (1997) iPLanet (2001) webmerchant/ Mac Auth. and CC refunds (1998) Keeping text formatting (like hard returns) (2002) Quick ShowIf question (1997) international time (1997) multiple prices (1998) WebCat2b12--[searchstring] bug (1997)