Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

First Time in Access 2K

DiegoMarcetDiegoMarcet Member Posts: 4
Hi, I'm just starting to programm databases and I've found a problem with an example:
the db is for a lab so I made 3 tables, 1 for the pacient data and the other 2 for data of two different studies. Since one pacient can have either one of the studies or both, the table with the pacient's data must be related to the other two (in this case by a protocol number that serves as the primary key). The problem comes when I want to establish this relationship between the protocol field in the pacient table and the same field in the other two tables at the same time.
Is the design of the db wrong or this can be done?

Thanks
Diego

Comments

  • Clyde McClainClyde McClain Member Posts: 3
    You shouldn't have a problem with the relationship. In the pacient table PacientId should be the primary key. table study 1: study1Id, PacientId. Table study 2: study2Id, PacientId.

    Let me see what your tables. Maybe I can help.

    You can email me at clmcclai@ci.camden.nj.us


    : Hi, I'm just starting to programm databases and I've found a problem with an example:
    : the db is for a lab so I made 3 tables, 1 for the pacient data and the other 2 for data of two different studies. Since one pacient can have either one of the studies or both, the table with the pacient's data must be related to the other two (in this case by a protocol number that serves as the primary key). The problem comes when I want to establish this relationship between the protocol field in the pacient table and the same field in the other two tables at the same time.
    : Is the design of the db wrong or this can be done?
    :
    : Thanks
    : Diego
    :

  • Chris BrownChris Brown USAMember Posts: 4,624 ✭✭

    ____ { http://forcoder.org } free video tutorials and ebooks about \ Swift, JavaScript, PHP, Java, PL/SQL, Visual Basic .NET, MATLAB, C#, Go, R, Python, C++, Assembly, Delphi, Ruby, Visual Basic, C, Objective-C, Perl, Scratch Bash, Ada, Scheme, Prolog, Awk, Lisp, D, Lua, LabVIEW, Julia, ABAP, Dart, Scala, Alice, VBScript, F#, Hack, Clojure, FoxPro, ML, Logo, COBOL, Rust, Fortran, Kotlin, Crystal, Erlang, Transact-SQL, Apex, SAS \ _______

Sign In or Register to comment.