Anchor Modeling - are data types part of the Model?

507 views Asked by At

A question about data types in the Anchor Model database design. The question assume separation of anchor model implementation from the anchor model itself.

In the Anchor Model xml we have following kind information related to data types:

  • dataRange="varchar(42)"
  • identity="int"
  • timeRange="datetime"

They are stored in Anchor Model entities (anchor/attribute) xml nodes.
Example

<attribute mnemonic="NAM" descriptor="Name" timeRange="datetime" dataRange="varchar(42)">

As of my understanding the data types does not affect Anchor Model as is, they affect its implementation to particular database vendor. Even time granularity on historized attributes has nothing to do with the model.

So the question is:

  • Wouldn't be more accurate to store data types information in metadata xml node? as they are not part of the model
  • Or am I missing something and data types have to be part of the Anchor Model? why?
1

There are 1 answers

1
Lars Rönnbäck On BEST ANSWER

If you want to reproduce the graphical symbols seen in an Anchor model diagram, then you are correct that less attributes are needed. The detection if something is historized is done on the presence of a timeRange attribute, so that would have to be replaced by a historized="true" in that case. If so, the rest could be moved to the metadata element.

The reason why it is not is simply that in the paper Anchor Modeling – Agile Information Modeling in Evolving Data Environments the formalization of the constructs actually include these attributes. For example, a timeRange is integral to a historized construct, which is why it ended up as an attribute on the corresponding element type.

With that being said, the XML structure could probably be cleaned up a bit. Do you see any advantage of moving those attributes to the metadata element?