Two different tables or just one with bool column?

前端 未结 7 2360
自闭症患者
自闭症患者 2021-02-19 15:06

We have two tables: OriginalDocument and ProcessedDocument. In the first one we put an original, not processed document. After it\'s validated and processed (converted to our XM

7条回答
  •  猫巷女王i
    2021-02-19 15:27

    Think of OriginalDocuments as of intermediate table. It can change as you input formats change. And it will contain fields which are not valid for imported ("processed") documents, like import date or import error description. And you can clean this table periodically.

    In contrast to OriginalDocument, ProcessedDocument table will contain only documents and fields valid for your system, with all of the check constraints, indexes and associated business logic. It's structure will change as your system's internal logic changes.

提交回复
热议问题