简体   繁体   English

想要数据库设计建议:重复输入数据

[英]database deign advice wanted: double data entry

I'm designing a database for capturing clinical trial data. 我正在设计一个数据库来捕获临床试验数据。 The data are entered twice by two persons, independently and the results must be matched. 数据由两个人分别输入两次,并且结果必须匹配。 What are the best database tools to use to achieve the best results. 什么是可用来获得最佳结果的最佳数据库工具。 Any one has similar experiences? 任何人都有类似的经历吗?

Your helps are highly appreciated. 非常感谢您的帮助。

thanks. 谢谢。

Are you designing a database, or the app to enter data into the database? 您是在设计数据库,还是在设计要向数据库中输入数据的应用程序?

If you are simply looking at the database, I would capture the following information: 如果仅查看数据库,我将捕获以下信息:

1) user A item X entered data
2) user A userID
3) user A intem X entered date/time

4) user B item X entered data
5) user B userID
6) user B intem X entered date/time

I'd then conclude that there was something called a "Datapoint" that contained the fields 然后我会得出结论,其中包含一些称为“数据点”的字段

-- entering userID
-- entry date
-- entry data (double value)
I'd also assign it a unique ID for the entry
--entryID (autoinc)

I would then state that there is something called a "data trial" that has two of these things called "data entries" 然后,我要指出的是,有一种叫做“数据试用”的东西,其中有两个东西叫做“数据条目”

If I believed that this number of entries per data trial might be 3 verifications instead of 2, I might change my design, but initially I would give my "Data Trial" the following definition: 如果我认为每个数据试用版的条目数可以是3个验证而不是2个验证,则可以更改设计,但是起初,我将为“数据试用版”提供以下定义:

-- data trial name
-- data trial creation date
-- user creating data trial (userID)
-- data entry 1 (dataPointID)
-- data entry 2 (dataPointID)
-- entries verified (boolean)
and give each of these a unique ID also
-- data trial ID (autoinc)

(I can't add comments yet...) Adding to Zak's answer, if there is any doubt over how many people will enter these values (say it jumps from two to three, like Zak says) I'd break the Data entry 1 and 2 (both dataPointIDs) into another table with two columns: (我还不能添加评论...)添加到Zak的答案中,如果对要输入这些值的人数有任何疑问(例如Zak说,它从2跳到3),我将中断数据输入1和2(两个dataPointID)都放入另一个具有两列的表中:

--data trial id
--data entry id

This way you could theoretically have as many different users inserting the data, and the data trial table would then contain only meta data about the trial, not "business logic," which only having 2 data entries per trial essentially is. 这样,从理论上讲,您可以有许多不同的用户插入数据,然后数据试验表将仅包含有关试验的元数据,而不包含“业务逻辑”,而“业务逻辑”每个试验实际上只有2个数据条目。

A similar setup could be used if different trials contain different amounts of data values to be entered. 如果不同的试验包含不同数量的要输入的数据值,则可以使用类似的设置。

如果您正在寻找一个好的数据库工具,则应考虑使用Entity-Relationship Designer来建模数据库,例如Case Studio或Embarcadero ER / Studio。

Databases are not designed to solve this issue. 数据库并非旨在解决此问题。 Double entry is an application issue and violates normalization. 重复输入是一个应用程序问题,违反了规范化。 I would implement a verification field to indicate that the data has been verified, and if it failed or not. 我将实现一个验证字段,以指示数据已被验证以及是否失败。 I would likely include an audit table containing each set of entries entered. 我可能会包括一个包含每个输入条目集的审核表。

The application would need a lookup function to determine if this is the first entry or a subsequent entry. 该应用程序将需要一个查找功能以确定这是第一个条目还是随后的条目。 There are a number of design issues related to this. 有许多与此相关的设计问题。

  • Verification can't find first entry. 验证找不到第一项。
  • How to correct data if it doesn't match on verification. 如果验证时不匹配的数据如何纠正。
  • How to handle unverified data which should be verified. 如何处理应验证的未验证数据。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM