Representing objects and dates

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • reidarT

    Representing objects and dates

    I want to show data objects as Y-axis (rows) and dates alng x-axis (fields)

    Date 01.01.05 02.01.05 03.01.05 ...
    Obj1 Free Free Occupied
    Obj2 Free Occupied Free
    Obj3 Occupied Free Occupied
    ....

    I wouldn't like to make a table with Dates as fields ( I need more than 2
    years ahead)
    Is threr another way to solve this problem?
    regards
    reidarT


  • Jon Skeet [C# MVP]

    #2
    Re: Representing objects and dates

    reidarT <reidar@eivon.n o> wrote:[color=blue]
    > I want to show data objects as Y-axis (rows) and dates alng x-axis (fields)
    >
    > Date 01.01.05 02.01.05 03.01.05 ...
    > Obj1 Free Free Occupied
    > Obj2 Free Occupied Free
    > Obj3 Occupied Free Occupied
    > ...
    >
    > I wouldn't like to make a table with Dates as fields ( I need more than 2
    > years ahead)
    > Is threr another way to solve this problem?[/color]

    I'm not entirely sure what the problem is, but DateTime is the normal
    way of representing dates and times, and there's nothing that stops
    them from representing dates later than 2007...

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    • reidarT

      #3
      Re: Representing objects and dates

      No, that is not what I ment.
      If the table contains the following fields
      Objekt
      Date1
      Date2
      Dtae3
      ....
      Date 750
      it becomes incredably big and I dont think you can have more than 25 fields
      in a table.
      regards
      reidarT


      "Jon Skeet [C# MVP]" <skeet@pobox.co m> skrev i melding
      news:MPG.1ccf7a 8e5997f92d98c02 0@msnews.micros oft.com...[color=blue]
      > reidarT <reidar@eivon.n o> wrote:[color=green]
      >> I want to show data objects as Y-axis (rows) and dates alng x-axis
      >> (fields)
      >>
      >> Date 01.01.05 02.01.05 03.01.05 ...
      >> Obj1 Free Free Occupied
      >> Obj2 Free Occupied Free
      >> Obj3 Occupied Free Occupied
      >> ...
      >>
      >> I wouldn't like to make a table with Dates as fields ( I need more than 2
      >> years ahead)
      >> Is threr another way to solve this problem?[/color]
      >
      > I'm not entirely sure what the problem is, but DateTime is the normal
      > way of representing dates and times, and there's nothing that stops
      > them from representing dates later than 2007...
      >
      > --
      > Jon Skeet - <skeet@pobox.co m>
      > http://www.pobox.com/~skeet
      > If replying to the group, please do not mail me too[/color]


      Comment

      • Jon Skeet [C# MVP]

        #4
        Re: Representing objects and dates

        reidarT <reidar@eivon.n o> wrote:[color=blue]
        > No, that is not what I ment.
        > If the table contains the following fields
        > Objekt
        > Date1
        > Date2
        > Dtae3
        > ...
        > Date 750
        > it becomes incredably big and I dont think you can have more than 25 fields
        > in a table.[/color]

        You can definitely have more than 25 fields in a table. However, it
        feels more like you want those to be rows rather than columns.

        It's still unclear exactly what your question is, I'm afraid.

        --
        Jon Skeet - <skeet@pobox.co m>
        Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

        If replying to the group, please do not mail me too

        Comment

        • John B

          #5
          Re: Representing objects and dates

          reidarT wrote:[color=blue]
          > I want to show data objects as Y-axis (rows) and dates alng x-axis (fields)
          >
          > Date 01.01.05 02.01.05 03.01.05 ...
          > Obj1 Free Free Occupied
          > Obj2 Free Occupied Free
          > Obj3 Occupied Free Occupied
          > ...
          >
          > I wouldn't like to make a table with Dates as fields ( I need more than 2
          > years ahead)
          > Is threr another way to solve this problem?
          > regards
          > reidarT
          >
          >[/color]
          How about an 'objects' table with the object id etc..
          and a 'dates' table with the date id etc..

          then a joining table to say these are in use or free or whatever.


          ie
          Objects
          Id Name
          1 Obj1
          2 Obj2

          Dates
          Id DateValue
          1 2005-01-01
          2 2005-01-02

          FreeDates (different implementations could easily be done)
          ObjectsId DatesId
          1 1
          1 2
          2 1


          in this scenario, object 2 is NOT free on 2005-01-02

          HTH

          JB

          PS. you can have up to 1024 cols in an sql server 2000 db IIRC

          Comment

          Working...