mmarino Posted February 10, 2016 Posted February 10, 2016 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.
comment Posted February 10, 2016 Posted February 10, 2016 See if this helps: If not, explain how your situation is different.
Kris M Posted February 10, 2016 Posted February 10, 2016 (edited) 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 February 10, 2016 by Kris M
Recommended Posts
This topic is 3220 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 accountSign in
Already have an account? Sign in here.
Sign In Now