Network

Monday, 1st December 2003
A network structure How to model a a network of nodes and connections?

Two associations: from and to?

It seems easy enough with just two entities: Node with two associations to connection Each connection has associations with two nodes, a 'from' node and a 'to' node. A node can have many 'from' and 'to' connections.

One association with a fixed cardinality of two?

Hmm, the double associations trouble me. 'From' and 'to' are relative in the given example. Connection with always two nodes The products flow right to lef. The money flows the other way. Should I turn it around? A connection is always between two nodes, irrespective of the direction? So, a one-to-many cardinality of 2 and nothing but 2? A network structure

Hmm, I like the simplicity of the alternative. Yet, the model does not match reality. A node can have more than one node, such as 'shop owner' in the example.

A role model

A node has many roles as start and endpoint A more complex model is required to facilitate the many, directed connections per node.

A few weeks to go... until I'll personally can test the hawker network with a mee-soup for breakfast somewhere in nice tropical highlands. I'm looking forward to it.

Till next nut,
Nut