English 中文(简体)
如何追踪包括许多至many绘图表的制片表的历史?
原标题:How to track history of db tables that include many-to-many mapping tables?

我在这里看到了几个问题,涉及追踪破碎的历史,但似乎无法找到一个与我们的情况相符的问题。 我们需要跟踪几个表格的历史,其中一些表格是许多与人连接的表格。 比如说,我们有这一计划:

EntityA
id
name

EntityB
id
name

ABLink
A_id
B_id

因此,跟踪实体A或实体B的变化似乎非常简单。 我们可以保留一个相同栏目加上日期印章和用户的逻辑框架。 但是,这些联系是什么? 我们如何保持对特定数据版本有效的一套链接? 我们需要能够恢复显示时间顺序变化的数据的历史。 因此,如果增加或删除一个环节,我们就指出了这一点。 Ec.

问题回答

建立一个ABLink记录表(如果你想要,它具有主要关键意义),该表与实体A &有外国关键链接;实体B记录表。 您可在原表中增加一个改动栏,以表明标识条目是否为insert/update/delete——当然,许多到manylog table shouldn t 是否包含任何<>update。 更改类别:

ABLink_Log       EntityA_Log     EntityB_Log
----------       -----------     -----------
id               id              id
A_Log_id         name            name
B_Log_id         change_type     change_type
change_type      date_stamp      date_stamp
date_stamp       user_id         user_id
user_id




相关问题
Version numbering basics? [closed]

Suppose I have a web application with some basic functions. I want to market it. So I would like to assign a version number - something like 0.0.1. What I want to know is are there any constraints ...

Versioning problem

people. I hope you can help me. In our development process we have a unix based file server with SFTP access (let’s call it A). This server store a large numer of xslt files we are working on. The ...

ECM - Document Control Management / Versioning and CMS

I anticipate this is going to be a very broad question however I shall endevour to be as concise as possible without divulging too much project critical information. For quite some time I have been ...

How do other development teams approach version numbers?

Our application is quite mature, and thus we are up to version 16. However, this can give the impression that the software is old and out of touch (how many commercial applications are there with a ...

SVN avoid storing passwords in plain text?

Under a bare bones setup for SVN on windows (without using VisualSVN), as per the instructions, the passwords are to be entered in the passwd file. Does SVN provide a way to encrypt or atleast mask ...

热门标签