Knotted-Attribute is the same as Anchor-Tie-Knot construct?

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

Knotted-Attribute is the same as Anchor-Tie-Knot construct?

delostilos
Hi Lars,

I was wondering if the Knotted-Attribute can also be modeled as a binary 1:n-Tie to an Anchor with on the other side the Knot. I have attached a picture of the construct.

knotted_attribute_is_knotted_tie.png

If it is in fact the same construct we do not need the Knotted-Attribute construct any more.

Also we can use the same construct with a binary n:m-Tie to model as the (MySQL) Set data type. The construct with a 1:n-Tie is then a enumaration data type.

Regards,
JJ.


Reply | Threaded
Open this post in threaded view
|

Re: Knotted-Attribute is the same as Anchor-Tie-Knot construct?

roenbaeck
Administrator
We do not allow the type of construct you have depicted. However, semantically the knotted attribute behaves just like the tie in your picture. The reasoning behind using an attribute is that a knot is normally thought of to contain a restricted set of values that attributes can use, also making a visual distinction between a knotted attribute and a knotted tie.

We have a refactoring rule, when you realize that whatever the knot represents actually has attributes of its own. The knotted attribute is replaced by a tie to an anchor with a single static attribute, after which you can add more attributes to that anchor. I have attached a picture:



Changing the cardinality of the tie should in this case also be able to capture the Set data type, but perhaps not as elegantly as if we would have allowed your construct.
Reply | Threaded
Open this post in threaded view
|

Re: Knotted-Attribute is the same as Anchor-Tie-Knot construct?

delostilos
The modeling tool does not allow to create the anchor-tie-knot construction, but if you add it manually to the XML it is shown by the modeling tool and it generates the correct SQL :-)

So a knot is actually a collapsed anchor-attribute construct. We're thinking about creating a repository to store the AM models, so I'm just checking the constructs and how to store them in a database (which is an AM model also).

The thing is should we allow the construct I mentioned in a newer version of the AM specification? Or maybe it is nicer to have an option in the tool to refactor a knotted attribute to a tie-anchor-attribute construct.