Hello, I'm trying to build a database to track keywords and their rankings in google. The problem is that the number of keywords will keep growing (new keywords being tracked will always be added) and the dates on which the ranking is recorded will also keep growing... So for example, the table structure (fields) could be: Keyword --- Rank on Date1 --- Rank on Date2 ---etc. forever.... i know this is bad design because the number of date fields would increase forever, but i can't figure out a design which would limit the number of fields...! Any help would be much appreciated..
I would use this structure: Keyword --- RankDate --- Rank Then on every new date add a new record to the database so your table looks like this: databases --- 2010-01-01 --- 7 databases --- 2010-01-15 --- 9 baseball --- 2010-01-15 --- 11 databases --- 2010-02-01 --- 6 baseball --- 2010-02-01 --- 11 Your next question will probably be about getting data out of it. When you ask that be sure to include exactly what you want the data to tell you and how you want to display it, include some example data if possible.
Wrong way. Structure should be: Table_1 ID_keyword -- Keyword Table_2 ID_rank -- ID_keyword -- Rank -- Date PS ID_rank is just for good database design.