Thread: Implementing SCD Type 2.
I'm new to PostgreSQL and this is my first post to this mailing-list.
Hopefully it's ok.
I'm looking into implementing SCD Type 2 in PostgreSQL:
with the approach of having valid_from and valid_to fields in a table.
Can anyone help me out with constraints, checks etc. for such a solution?
My table should contain the following columns:
user_id
email_address
valid_from
valid_to
where an user can change e-mail address.
I'm implementing updates etc. via a API, however, I would like to have the table secured for invalid data, overlap etc.
Henrik Aagaard Sørensen <henrikaagaardsorensen@gmail.com> wrote: > I'm looking into implementing SCD Type 2 in PostgreSQL: > http://en.wikipedia.org/wiki/Slowly_changing_dimension > > with the approach of having valid_from and valid_to fields in a table. You might be interested in this recent thread: http://www.postgresql.org/message-id/flat/50D99278.3030704@dc.baikal.ru#50D99278.3030704@dc.baikal.ru -- Kevin Grittner EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company