Let's say I have a team, which has members. I have a content type for team and a content type for individual team members. Let's say there are also other relationships, for instance teams can belong to departments, and there are projects that can be assigned to individuals or teams.

As I understand it there are two ways I can define the relationships between these entities - either Entity references, or using Taxonomy terms. When I should use one type over the other? Is it best to choose just one method, or mix them?

It seems to me that Taxonomy is the most flexible, because it is easy to build trees using taxonomy types, or for instance if within a team I then decided I wanted to build a hierarchy in the team the functionality is already there (just drag the taxonomy terms into the hierarchy) whereas if I've used Entity reference I can't think of a simple way to do that (other than adding taxonomy, which then results in redundancy).

It feels as if there is something I'm not understanding here, but I'm not sure what it is!

Any help would be appreciated.

  • Ok, I've made some progress in understanding - an Entity reference can actually be to a Taxonomy term! so "Team B" could actually be both a Content Type (containing the description) and an Entity reference link to a Taxonomy term (of the same name). Then a user could be linked to the Taxonomy term, rather than the content type...
    – James
    Commented Mar 19, 2015 at 14:51
  • I guess one thing I still haven't worked out is - what is the difference between having a field in a content type that is a taxonomy term, and an entity reference that links to a taxonomy term - the latter just seems like an additional level of complication.
    – James
    Commented Mar 19, 2015 at 14:58
  • They are pretty comparable. Out of consistency, I like to use Entity Reference. Commented Mar 19, 2015 at 15:15
  • But if you use Entity reference there are still instances when it is still better to use taxonomy aren't there? So for instance if we have an organisation hierarchy, it would seem to me that taxonomy is a better way to do that.
    – James
    Commented Mar 19, 2015 at 15:19

1 Answer 1


You are talking about two different concepts here. The first question is related to whenever one wants to organize content into different categories or if one wants to build a relationship between existing content types. The other question is, if, when using a taxonomy, will it be better to use a taxonomy reference field or an entity reference field.

Regarding the first concept

It depends on your use case. Taxonomies are great for building hierarchies, as you mentioned, but ideally, you shouldn’t use taxonomies to contain actual content. The reason for that is easy — while you can add fields to taxonomy terms, all hierarchical levels in a taxonomy use the same fields. Taking your example with members belonging to different teams, this might lead to problems. If you want to store more information about a team or member than just the name, If, for example, you want to store information about a member’s first name, last name, and biography, and add this fields to the taxonomy, they would be available on team terms as well. And if you add a team description field for the teams, those will show up for team members.

Taxonomies are best used when organizing similar items hierarchically. Like tags, for example:

  • vegetable
    • carrot
    • potato
  • fruit
    • apple
    • banana

Entity references are excellent for establishing relationships between content types. Examples include when you have a node type ‘team’ and a node type’ team member,’ each with their own fields. Or a node type ‘song’ which is referencing an ‘album’ which itself references a ‘musician.’ In this regard, entity references are more flexible than taxonomies, as it allows for more complex relationships. When you use views, you can also utilize these relationships. Taking your example, you could create a view of all team members, and using the entity reference for a relationship, and one could display any field on the team content type along with fields from the member node.

Mixing node referenced and taxonomy fields are legit too. In your example with the teams, both team and member could be a node, referencing each other with an entity reference. At the same time, the department could be a taxonomy with all available departments.

Regarding the second concept

When D.O. released D7, it shipped with a taxonomy reference field to use when referencing taxonomies. Since then, we’ve seen the release of the Entity API module and, consequently, the entity reference module, and since terms and taxonomies are entities, one can reference them like any other entity. At this point, the two are working very similarly, and in many cases, it doesn’t matter which one you use. However, there are still some contributed modules providing field formatters and widgets, which only work for one or the other. So, it mostly depends if you need such a formatter if you should use taxonomy reference or entity reference.

As D.O is replacing the taxonomy reference field with the entity reference field in D8, I prefer to go with the entity reference field to link to taxonomies rather than the field supplied by the taxonomy module.

  • 2
    What a wonderful explanation! Thank you very much! Now I understand!
    – James
    Commented Mar 19, 2015 at 16:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.