复式记账系统的数据库设计
数据库设计中是否应该记录日记帐分录?
在现实世界中,保留每日分录簿,然后将每日分录簿转移到复式记账帐户中是有意义的。但在计算机化版本中,这样做会产生重复的记录,这不太有意义?
Real life:
User ---> journal day book (single entry) ---> ledgers account (double entry)
Should journal entries be recorded in a database design?
In the real world it makes sense to keep a daily entry book, then later transfer the daily entry book into double entry accounts. but in the computerized version, doing this produces duplicate records and that doesn't quite make sense?
Real life:
User ---> journal day book (single entry) ---> ledgers account (double entry)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
复式记账的要点是任何经过培训的会计师都会立即理解它。因此,如果您正在为会计师构建一个系统,那么如果您精确地模拟他们的领域,沟通将会变得更加容易。还可能存在只能在复式记账模型中实现的业务规则(只是我的猜测)。
它还提供了良好的审计跟踪,这总是有用的。
编辑
如果我向一群具有会计背景的用户展示一个逻辑数据模型,我肯定会将日记帐作为一个实体。但是,当涉及到物理数据库时,我更愿意将其实现为分类帐表的视图。
The point about double entry book-keeping is that any trained accountant would understand it immediately. So if you are building a system for accountants then it will make communication easier if you model their domain exactly. There may also be business rules which can only be implemented in a double entry model (just a guess on my part).
It also provides a good audit trail, which is always useful.
edit
If I were presenting a logical data model to a bunch of users from an accounting background I would definitely include the Journal as an Entity. However when it came to the physical database I would prefer to implement it as a view over the Ledger table.
你的问题实际上是关于会计系统设计的。操作上的考虑是审计追踪。
在我看来,如果跳过日记阶段,可能很难从数据库中记录的内容以及用户输入的内容进行追溯。如果数据输入的用户界面看起来像日记本,如果您希望能够追溯,则应该记录日记本。会计师可以帮助您评估这个问题的重要性。
由此产生的冗余可能会耗费计算机资源。如果处理过程中存在错误,它还可能导致数据库内部不一致。能够区分系统故障和数据输入中的人为错误之间的差异可能值得忍受不一致的痛苦。
再次,会计师可以告诉你。如果没有会计师为该项目提供建议,请找一位会计师。
Your question is really about accounting systems design. The operative consideration is audit trail.
In my opinion, if you skip the daybook stage, it may be difficult to trace back from what's recorded in the database and what the user(s) entered. If the user interface for data entry is going to look like a daybook, you should record a daybook, if you want to be able to trace back. An accountant can help you evaluate the importance of this issue.
The resulting redundancy can cost in terms of computer resources. It can also result in a database that's internally inconsistent, if there are bugs in the processing. It's probably worth the pain of inconsistency to be able to tell the difference between system screwups and human error in data entry.
Again, an accountant can tell you. If there are no accountants advising the project, get one.
复式记账会计不会产生重复记录,因为复式记账的每一面都进入不同的名义分类账科目。不确定这是否是您所说的“重复记录”的意思,但我只是认为应该清除它。显然,在数据库中创建重复行通常不是一个好主意。
Double entry accounting does not produce duplicate records because each side of the double entry goes to a different nominal ledger account. Not sure if that's what you meant by "duplicate records" but I just thought that ought to be cleared up. Obviously creating duplicate rows in a database is generally not a good idea.