[TYPO3-ect] Roles (2 alternative ways)

Elmar Hinz elmar.DOT.hinz at team.MINUS.red.DOT.net
Thu Sep 28 09:19:53 CEST 2006


Hello,

in the posting "Symmettric MM-Relations" I have presented this model:


uid1 - ui2 - table1 - table2 - sorting1 - sorting2 - type/role(?)


Now what is the role?

Between two tables there can be different types of relations. If we have
for example persons and groups it is not enough to write down a relation
between a user and a group. A person could be a pupil of a class or the
teacher of the class. I would be funny to find the teacher as result for
pupils and vice versa. So we need to give types to the realations. If we
talk of persons and groups we could also call that type a role, the role
of a person within a group.

Different roles?

Now I person can play different roles within the same group. In the
model above this would result in multiple entries for the same person
within the same group, but with another relation type. There is an
alternative way to have the entry once and to relate the entry itself to
different roles by a second mm-relation.

MM-Table: id - uid1 - ui2 - table1 - table2 - sorting1 - sorting2

Roles-Table: id - role

MM-to-Roles-Relation: mm_id - roles_id


Comparism

To me the first solution looks more simple. What do you think about?
Which solutions do you know for this task?


Elmar






More information about the TYPO3-team-extension-coordination mailing list