I was wondering if this is the right way of modeling/implementing a relationship with properties in AwareIM, i.e. similar to an edge with properties in a graph database:
https://www.screencast.com/t/BYQkKoxvC
I understand that AwareIM doesn't require building auxiliary tables/BO's in many-to-many relationships, but I'm wondering if in the above case, where the relationship itself has properties, would require creating such a BO, or if there is a different/smarter way of implementing this.
Cheers.
Modeling relationshps with properties
-
- Posts: 32
- Joined: Fri Feb 01, 2013 3:31 pm
- Location: USA
-
- Posts: 2391
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Modeling relationshps with properties
Hi Spark,
If the M:M Relationship requires Attributes of it's own, then, yes... you create an intermediate BO
Just keep in mind how you would want to handle orphaned records.
You can either decide which of the two BOs you are referencing is the most logical parent so that you can set the Reference to Owned By (enforcing cascading deletes).
This can be an issue as that BO should NOT be Owned by more that 1 BO.
Better option is to handle the intermediate BO via Processes.
If the M:M Relationship requires Attributes of it's own, then, yes... you create an intermediate BO
Just keep in mind how you would want to handle orphaned records.
You can either decide which of the two BOs you are referencing is the most logical parent so that you can set the Reference to Owned By (enforcing cascading deletes).
This can be an issue as that BO should NOT be Owned by more that 1 BO.
Better option is to handle the intermediate BO via Processes.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 32
- Joined: Fri Feb 01, 2013 3:31 pm
- Location: USA
Re: Modeling relationshps with properties
Hi Mark,
thanks for your prompt comments.
Yes, you are right. I actually made a mistake; the PersonSite-->Person relationship should be as follows to ensure integrity:
https://www.screencast.com/t/HNFY7Tqgm0A
Cheers,
Mathias.
thanks for your prompt comments.
Yes, you are right. I actually made a mistake; the PersonSite-->Person relationship should be as follows to ensure integrity:
https://www.screencast.com/t/HNFY7Tqgm0A
Cheers,
Mathias.
-
- Posts: 2391
- Joined: Mon Jul 02, 2012 12:24 am
- Location: Ulaanbaatar, Mongolia
Re: Modeling relationshps with properties
Be Careful Spark....
That looks to me like you have Owned Reference between Site <--> PersonSite and Person <--> PersonSite
I would manage PersonSite using Processes and hence both References should be Peer
Site:
Company
Address1
Address2
Adderss3
City
State
Postcode
Country
pm_PersonSite
PersonSite
ps_Site (Peer Single Reference to Site - Matching Reference pm_PersonSite [Multiple])
ps_Person (Peer Single Reference to Person - Matching Reference pm_PersonSite [Multiple)
EmployedAt
CurrentlyWorkingAt
HomeAt
CurrentlyStayingAt
Person
FullName
FistName
LastName
pm_PersonSite
Note: Create the Reference From PersonSite BO rather than from the Site or Person BO.
That looks to me like you have Owned Reference between Site <--> PersonSite and Person <--> PersonSite
I would manage PersonSite using Processes and hence both References should be Peer
Site:
Company
Address1
Address2
Adderss3
City
State
Postcode
Country
pm_PersonSite
PersonSite
ps_Site (Peer Single Reference to Site - Matching Reference pm_PersonSite [Multiple])
ps_Person (Peer Single Reference to Person - Matching Reference pm_PersonSite [Multiple)
EmployedAt
CurrentlyWorkingAt
HomeAt
CurrentlyStayingAt
Person
FullName
FistName
LastName
pm_PersonSite
Note: Create the Reference From PersonSite BO rather than from the Site or Person BO.
Cheers,
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
Mark
_________________
AwareIM 6.0, 8.7, 8.8, 9.0 , MariaDB, Windows 10, Ubuntu Linux. Theme: Default, Browser: Arc
Upcloud, Obsidian....
-
- Posts: 32
- Joined: Fri Feb 01, 2013 3:31 pm
- Location: USA
Re: Modeling relationshps with properties
I see what you are saying.
Thanks!
Thanks!