Jump to content

Calling two separate related records


mmarino
 Share

This topic is 2329 days old. Please don't post here. Open a new topic instead.

Recommended Posts

So I have a Person table. There are two types of people, the one who is filling out the report and the person who is the subject of the report. If at all possible, I'd like to be able to pull both of their records from another table using their primary keys. I can't think of how to do this though and may have to resign myself to separating the persons table.

Link to comment
Share on other sites

You need to spend a few minutes thinking about the relationship between the REPORTS entity, the PERSONS entity and the PERSON_TYPES (probably best named PERSON_ROLES imho) entity.

Can a report have only two persons (one with type/role subject and one with type/role author)?

This arrangement will result in a different design than if there can be zero or many persons with different types/roles related to one or more reports.

The latter could probably be tackled with a join table for REPORT_PERSONS but the devil is in the details.

14 minutes ago, comment said:

See if this helps:

If not, explain how your situation is different.

Nice!

Edited by Kris M
Link to comment
Share on other sites

This topic is 2329 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.