in reply to Re: Database setup for daily db
in thread Database setup for daily db

Thank you for your reply :)

I was thinking about making the script that way you showed me but wanted to make sure if its efficient since they'll be 1000+ data tables in the next 3 yrs or so. I'm using MySQL on a Win2K server. The data that is going to be inputted for each day would be around 2-10 names of people.

Anthony

Replies are listed 'Best First'.
Re: Re: Re: Database setup for daily db
by zigdon (Deacon) on Oct 08, 2002 at 14:24 UTC
    Sounds to me like you most defenitly want to use a timestamp and one table with 1000s of entries, instead of 1000s of tables. Not sure if MySQL is optimized for such a large number of tables, but a large number of rows in a single table is extreamly common.

    -- Dan

      Hey,

      How would I use the timestamp way?

      would it fit this format:

      Click on the date you want to view data for

      Dates:
      10/08/02
      10/09/02
      10/10/02
      etc...

      Then if the user clicks 10/08/02 the data for that day would show up

      Data for 10/08/02:

      Anthony Jones
      John Doe
      Robert Jones
      etc...

      Anthony

        yah, it should be able to do that. Each day, you add the entries of that day to a table, with a stamp of the day (say, 20021008 for 10/08/2002). When you want to see the available dates, you just do a SELECT DISTINCT Date FROM Table. Then, when you want to see the entries for 10/08/2002 day, just do a SELECT Users FROM Table WHERE Date=20021008.

        Note that I'm not a database guru, but this should give you an idea how to proceed.

        -- Dan