Hey guys-
I have a db where I'm not sure what kind of relationship I need to establish between the tables. I have a db that manages real estate properties and realtor information. Each record can have 3 separate Realtors represented (or, as little as 1 realtor). Each Realtor has their own office, or, might have the same office as the other realtors. So, one record can have anywhere from 1 to 3 Realtors associated with it.
I have a Property Table (holds all the info on the property as well as the Realtor's unique alphnumerica ID Code).
I have a Realtor Table (holds all the contact info for the Realtor, as well as their unique alphanumeric Office Code)
And I have a Realtor Office Table (holds the contact info of the Realtor's Office).
In the Properties table- I have 3 fields for the 3 separate Realtor's ID Codes (like an employee number). Let's call it Agent1Code, Agent2Code, and Agent3Code. There won't always be an Agent2 and Agent 3 in the data- but sometimes there is.
How do I set this up and establish the proper relationships?
I have a db where I'm not sure what kind of relationship I need to establish between the tables. I have a db that manages real estate properties and realtor information. Each record can have 3 separate Realtors represented (or, as little as 1 realtor). Each Realtor has their own office, or, might have the same office as the other realtors. So, one record can have anywhere from 1 to 3 Realtors associated with it.
I have a Property Table (holds all the info on the property as well as the Realtor's unique alphnumerica ID Code).
I have a Realtor Table (holds all the contact info for the Realtor, as well as their unique alphanumeric Office Code)
And I have a Realtor Office Table (holds the contact info of the Realtor's Office).
In the Properties table- I have 3 fields for the 3 separate Realtor's ID Codes (like an employee number). Let's call it Agent1Code, Agent2Code, and Agent3Code. There won't always be an Agent2 and Agent 3 in the data- but sometimes there is.
How do I set this up and establish the proper relationships?