开发者

database deign advice wanted: double data entry

开发者 https://www.devze.com 2023-01-01 12:40 出处:网络
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

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 开发者_JS百科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:

-- 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:

--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.

A similar setup could be used if different trials contain different amounts of data values to be entered.


If you are looking for a good database tool you should consider using a Entity-Relationship Designer to model your database, such as Case Studio or 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.
0

精彩评论

暂无评论...
验证码 换一张
取 消