Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8iKl-0002NA-Df for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 09:57:43 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1i8iKk-0004Ir-4H for pgsql-general@arkaria.postgresql.org; Fri, 13 Sep 2019 09:57:42 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1i8iKj-0004IZ-Nw for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 09:57:41 +0000 Received: from mailbackend.panix.com ([166.84.1.89]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.92) (envelope-from ) id 1i8iKc-0007Kz-NI for pgsql-general@lists.postgresql.org; Fri, 13 Sep 2019 09:57:40 +0000 Received: from panix2.panix.com (panix2.panix.com [166.84.1.2]) by mailbackend.panix.com (Postfix) with ESMTP id 46V9zd3hqHzlJg for ; Fri, 13 Sep 2019 05:57:33 -0400 (EDT) Received: by panix2.panix.com (Postfix, from userid 17622) id 46V9zd1qZtz1ZVT; Fri, 13 Sep 2019 05:57:33 -0400 (EDT) Date: Fri, 13 Sep 2019 05:57:33 -0400 From: stan To: pgsql-general@lists.postgresql.org Subject: How to handle things that change over time? Message-ID: <20190913095733.GD22033@panix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Editor: gVim User-Agent: Mutt/1.12.1 (2019-06-15) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I am working on a system that will support internal bossiness work for a company. Periodicly things will change in their "world". For example they periodically recalculate the "mark up" of various components, of their bushiness, such as labor and or purchased materials. Presently I am keeping these constants in a table, and I have the constant, and an effective start, and end date for these factors. In this scenario, the number of rows will just grow over time, and by using the proper conditions in our select statement, i can apply the correct factors as they change over time. In another scenario, a column of the employee table is the pay rate. Obviously this will change over time, also. It does not appear to me that this lends itself to this same treatment, as most of the data associated with a given employee, is fairly static, and if I add an entire row, just because the pay rate changed, this looks overly complex. This cannot be the first time this issue has been addressed. What have others done in this scenario?