Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Database Design / April 2008

Tip: Looking for answers? Try searching our database.

Parent Child Tables and Relationships

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Access User - 02 Apr 2008 20:28 GMT
I have a need to design a mdb file that revolves around two tables. My main
table is patient-specific and needs to have a patient ID field, a Date field
and a reviewer field. I'm going to call them ID, MRADATE and REVINT. For any
ID, there will be two records having the same MRADATE but different REVINT.

There is also a child-subform/table which needs to be synched up with the
main table. The child table needs to have an ID field, a REVINT field and an
ANEURISM field.

For any patient ID on a given MRADATE, each of the pair of REVINT will have
a chance to read that patient's MRA exam and code their findings in the
sub-table. There is an upper limit (4) on the number of ANEURISMs that can be
entered per ID by a REVINT.

At this point, it doesn't look as though I can have all of this in one
relationship involving a parent and child table....I've worked around that by
having a pair of parent and child tables, one per REVINT. My PK on each
parent is ID and on each child is ID and ANEURISM. Although REVINT need to
get entered, they are getting their respective values by 'default' within
each pair of parent/child tables.  

Though this setup gave me the ability to have the one-to-many setup complete
with referential integrity constraints and cascade edit/delete capability, it
just seems that if I had the benefit of more time, it could've/would've been
set up with one pair of tables.

Am I right?
Evan Keel - 02 Apr 2008 21:40 GMT
Your design is wrong. What if your rules change and you can have 3 REVINT
(btw, what is a REVINT?) enter findings? Or 4 or 10?

What you want is a Patient Table with PatientID as primary key along with
other patient information. Then you will want a child table with
PatientID, MRADate, and MRANumber as primary keys. Also in this table will
be REVINT and Finding. This will allow for a patient to have many MRAs, on
many MRA dates, and many MRAs on a particlular date. You will have to
enforce the cardinalities (ex. 4 anuerisms per patient) through code.

Good Luck,

Evan
> I have a need to design a mdb file that revolves around two tables. My main
> table is patient-specific and needs to have a patient ID field, a Date field
[quoted text clipped - 23 lines]
>
> Am I right?
Access User - 02 Apr 2008 22:03 GMT
Well a few things....

The data are recorded on paper forms and need to get input into a
computerized database. There will only ever be two REVINTs (sorry it meant
reviewer's initials, and they are the same throughout). Each REVINT has read
the same  MRA film/scan from the patient (ID) which was film/scan was
acquired on a particular MRADATE. There are certain findings that each REVINT
can be asked to record as having been absent/present per patient film/scan
and they are recorded in the parent table, BUT when it comes to aneurisms,
then the number of them can vary from film to film as well as their
properties, hence there's a sub-table per reviewer to record the properties
of those aneurisms; not to put too fine a point on this, but the two
reviewers examining the same IDs film can record different numbers of
aneurims --

> Your design is wrong. What if your rules change and you can have 3 REVINT
> (btw, what is a REVINT?) enter findings? Or 4 or 10?
[quoted text clipped - 47 lines]
> >
> > Am I right?
Jeff Boyce - 03 Apr 2008 19:09 GMT
?!Reviewer's Initials?!

Let's hope you never have John Adam Smith and Joe Arnold Smithson
reviewing?!

Regards

Jeff Boyce
Microsoft Office/Access MVP

> Well a few things....
>
[quoted text clipped - 75 lines]
>> >
>> > Am I right?
Access User - 03 Apr 2008 20:47 GMT
As in JAS_1 and JAS_2 you mean?

> ?!Reviewer's Initials?!
>
[quoted text clipped - 85 lines]
> >> >
> >> > Am I right?
Jeff Boyce - 04 Apr 2008 19:14 GMT
While that would provide a way to differentiate two folks with the same
initials, which one is "_1" and which is "_2"?!

A more user-friendly way to accomplish about the same thing would be to use
an autonumber ID field that is NEVER displayed to the user, and use actual
names (users generally understand peoples' names better than some code).

Of course, then you get to worry about having two "John J. Doe"s as
reviewers!  Isn't working with real live people fun?!

Regards

Jeff Boyce
Microsoft Office/Access MVP

> As in JAS_1 and JAS_2 you mean?
>
[quoted text clipped - 105 lines]
>> >> >
>> >> > Am I right?
Bärbel Hofmann-Panke - 04 Apr 2008 15:36 GMT
Bitte benutzen Sie nicht mehr meinen Acvount. Ich gehöre nicht zur
Microsoft-Discussionsgruppe. Danke

Am 02.04.2008 21:28 Uhr schrieb "Access User" unter
<AccessUser@discussions.microsoft.com> in
A4EE24A6-50C7-4A45-BDF7-344200A81ADF@microsoft.com:

> I have a need to design a mdb file that revolves around two tables. My main
> table is patient-specific and needs to have a patient ID field, a Date field
[quoted text clipped - 23 lines]
>
> Am I right?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.