Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2007

    Help designing tables


    I am new in this forum. Excuse me for my English, but I am learning and for me is very difficult to write in English.

    As you are supposing I need help in the designing of some tables, perhaps a little orientation. I am working in a project about a group of cities, and development indicators (???) like unemployment rate and salary rate (150 indicators in total) .
    There are 5 indicator types, and 30 subtypes (more or less). To calculate these indicators I have in total 220 variables, and the indicators must be calculated every year.
    I need all indicators calculated in a table, because it is going to be used in a map service to create thematic maps, and it can’t be calculated when the users display the map.

    This has been my solution:

    Table: Cities

    [Id,Name. …..]

    Table: Variables

    [CityId, VariableType,Value,Year]
    There are 220 variable types

    Table: VariableTypes

    [Id,Name,Explanation] today 5 registers

    Table: Subtypes

    [Id,TypeId,Name,Explanation] today 150 registers

    Table: Indicators

    [subTypeId, CityId, Value,Year]

    My idea is that when someone put a new value or changes a value in Variables, calculate all indicators calculated with this variable with triggers.

    What do you think about my solution? Is it a good idea?


  2. #2
    Join Date
    Jan 2007


    Please help me!

  3. #3
    Join Date
    Apr 2002
    Toronto, Canada
    Quote Originally Posted by Sasiko
    What do you think about my solution?
    looks okay to me so far... | @rudydotca
    Buy my SitePoint book: Simply SQL

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts