Shared Knots?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Shared Knots?

Ben Coates
Is it intended that each Knot be associated only to a single Anchor (via a single Attribute) or a single Tie?  

It looks like the modeler enforces this but I haven't found a mention of it in the papers one way or the other aside from the "Schema Evolution" slide in http://www.anchormodeling.com/wp-content/uploads/2011/05/Anchor-Modeling-Open-AMW.pdf
Reply | Threaded
Open this post in threaded view
|

Re: Shared Knots?

roenbaeck
Administrator
Hi Ben,

it should be possible to associate a single knot to any number of attributes or ties. Try to do a multiple select (shift + click) between an already associated knot and a tie or attribute to which you want to connect it, then select "Connect" from the context sensitive menu. I believe that I added a keyboard shortcut 'c' for the operation as well.
Reply | Threaded
Open this post in threaded view
|

Re: Shared Knots?

Marcel Wiegand
When I try to connect two attributes from the same Anchor to a shared knot I receive an error when the database is created.

There are two problems:

1. The Knot alias is duplicated in the from clause of the anchor view(s)
2. The Knot name is duplicated in the select of the anchor view(s)

Reply | Threaded
Open this post in threaded view
|

Re: Shared Knots?

roenbaeck
Administrator
I've been thinking about this for a week now and can only conclude that I've made a mistake in the naming of knot columns in the views.

To rectify this we would need to change the naming convention in view to the following. Let's say you have an anchor AC_Actor, two knotted attributes, AC_PTA_Actor_PinTypeA and AC_PTB_Actor_PinTypeB, both sharing the knot PTP_PinType. Then the identity column PTP_ID would have to be changed in the view to PTA_PTP_ID and PTB_PTP_ID respectively. The aliases would be [PTA_PTP] and [PTB_PTP] and the value columns PTA_PTP_PinType and PTB_PTP_PinType.

The drawback is of course that all (in production) views containing at least one knot would suddenly be "broken" due to the change in naming. It would be a non-backwards compatible change.

Another solution would be to only change the names of the second knot columns when there is a shared knot, but that would not be consistent. Neither of these solutions are very tasteful unfortunately.

Finally, we could disallow a knot to be shared by more than one attribute on the same anchor, forcing you to create two very similar knots. This would be a limitation of course...

Any suggestions on how to move forward with this issue?
Reply | Threaded
Open this post in threaded view
|

Re: Shared Knots?

Marcel Wiegand
Why not let the user choose between the new and the old solution (old and new naming convention) within the defaults menu. This is a chooice between sharing knots and not sharing knots.

If you have an old model then you choose not to share the knots and the old naming convention will be used.

When you create a new model then the default setting would be the new naming convention and the possibility to share the knot.