Loading ...
Sorry, an error occurred while loading the content.
 

Re: [agileDatabases] keeping history

Expand Messages
  • Mustafa Ekim
    thanks guys. I ve read all u ve written and they helped me so much. I hope I will share my experience.
    Message 1 of 11 , Jul 20, 2007
      thanks guys. I've read all u've written and they
      helped me so much. I hope I will share my experience.



      ____________________________________________________________________________________
      Moody friends. Drama queens. Your life? Nope! - their life, your story. Play Sims Stories at Yahoo! Games.
      http://sims.yahoo.com/
    • Curt Sampson
      ... Not at all. It s quite easy to keep it all in one table and create a view for the current data, and have all of your current data queries work against
      Message 2 of 11 , Jul 23, 2007
        On Wed, 18 Jul 2007, Gabriel Tanase wrote:

        > If most of the SQL in your applications only deals with current data, then
        > keeping history in the same table(s) will force each and every SELECT to
        > include at least a condition involving the "current indicator" column. To
        > avoid clogging each and every SQL with conditions on the history management
        > columns, it is therefore better - in this scenario - to keep history in
        > separate tables.

        Not at all. It's quite easy to keep it all in one table and create a
        view for the current data, and have all of your "current data" queries
        work against that view.

        The one-table design also simplifies setting up constraints.

        Unfortunately, on larger tables (that grow to hundreds of thousands or
        millions of rows) that become filled with mostly history, you may start
        to run into problems with performance that can be fixed only by changing
        your logical design, since in most DBMSes the logical and physical
        designs are inextricably linked. But don't give in soon, other tricks,
        such as the clustered index on the "current data or not" property one
        mentioned earlier in this thread, can help.

        cjs
        --
        Curt Sampson <cjs@...> +81 90 7737 2974
        http://www.starling-software.com
        The power of accurate observation is commonly called cynicism
        by those who have not got it. --George Bernard Shaw
      Your message has been successfully submitted and would be delivered to recipients shortly.