Results 1 to 6 of 6
  1. #1
    Davide is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    38

    design: cross-ref issues

    Dear all,


    I have the following design issues: an analysis is made of several tests. A test is performed measuring one parameter (given a unit of measure) by means of some methods. The test will produce an outcome, a measure of the parameter in the given unit of measure.
    For example, Aluminium may be measured in mg using methods 1 and 2, or 2 and 3 (and these are two different tests).
    The same parameter may be measured using different units, and they would be different tests. Same if the parameter changes, of course.
    In some sense, tests are master data, since the same couple parameter-unit of measure can be measured in a given set of methods.
    The outcome instead is generated after a test is selected and performed for an analysis.
    See the following table as an example of possible tests.

    TestID Parameter UM Methods
    1 Al mg method1, method2
    2 Al mg method2, method3
    3 Al ml method4
    4 Cd mg method3, method4

    At run-time, the lab technician will select testID 1 and perform the test, producing an outcome. The same test can be perfomed several times, but in different analyses, producing different outcomes.

    At the same time, a parameter may have some limits, given the unit of measure, according to different destinations.
    I thought about two possible design solutions, which I attach here. If you look at the E/R diagrams in both files you can see the two options.
    Basically, in the second DB, Lab2, I got rid of the table ParamUM, which simply puts together the parameter and a unit of measure.
    Which do you prefer and why? Or are they equivalent? Thanks a lot.
    Attached Files Attached Files

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    use 2 tables:

    ElemID, elem, UM
    1,AL, mg
    2, AL, mg
    3, AL, ml
    SubTbl:
    testID, ElemID, method
    1,1,method1
    2, 1, method2
    3, 3, method4
    4, 2, method2
    5, 2, method5

  3. #3
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    Sorry for not having time to examine your example, but this is a simple lab schema we use (table users is link to users module)
    Click image for larger version. 

Name:	LabTestSchema.jpg 
Views:	14 
Size:	58.5 KB 
ID:	46429

  4. #4
    Davide is offline Advanced Beginner
    Windows 10 Office 365
    Join Date
    Jul 2020
    Posts
    38
    That is what I am doing, but there are two possibilities:

    1 I create the table ParamUM

    Click image for larger version. 

Name:	Lab1.jpg 
Views:	11 
Size:	64.0 KB 
ID:	46444

    2 I attach Parameter and UM directly to both Test (on one side) and Limit (other side)

    Click image for larger version. 

Name:	Lab2.jpg 
Views:	11 
Size:	52.0 KB 
ID:	46445

    I think table ParamUM comes handy, but at the same time it seems redundant, since it is made just of Ids (as Test btw)
    Ideas on this? Thanks

  5. #5
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,044
    If you have a many to many relationship: 1 parameter can have many units and 1 unit can be attributed to many parameters, there is in almost every case a linking table that holds the possible combinations of ID's. So tables with only ID's are common and even essential in relational models. However, in our application we see the unit as a property of the analysis (test in your example). Some tests measure a parameter in ppm, others in mg, for instance if you test Fe in water you get an other measuring unit as if you would measure Fe in Iron ore, but that's normal because it are 2 whole different kind of tests.

  6. #6
    ssanfu is offline Master of Nothing
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    @ Davide
    You might want to read this article about Primary Key Tips and Techniques

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 08-15-2017, 08:44 AM
  2. Design Issues
    By shin_mitsugi in forum Forms
    Replies: 1
    Last Post: 05-15-2014, 10:45 PM
  3. Couple Design Issues
    By dpasanen in forum Forms
    Replies: 4
    Last Post: 03-29-2012, 07:47 AM
  4. My first database-design issues
    By rorybecerra in forum Access
    Replies: 8
    Last Post: 02-08-2012, 01:48 PM
  5. Issues with Subform Design
    By Scyclone in forum Forms
    Replies: 9
    Last Post: 10-20-2011, 07:14 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums