I am considering building a fantasy sports management system with Drupal. The system will need content, so that's taken care of with the standard Drupal system. However, does it make sense (or even possible) to create new entities that represent players, teams, leagues, stat-lines, etc?

I have built systems like this in the past (.NET) and it's difficult for me to wrap my mind around the idea of combining content nodes with players, teams, and stats. There are many fields that are exclusive to each type of node/entity and the sheer volume of players and stat data will push the node tables to crazy levels.

I haven't messed with Drupal 7 entities (which I believe abstracts nodes, users, and taxonomies), but I'd like to hear opinions if this concept is possible.

  • 1
    Yes, it's all possible.
    – Nikit
    Commented Mar 12, 2011 at 23:39

3 Answers 3


Regarding the nodes table getting large: if you have a lot of nodes, the node table will be large. If you have a lot of players and store them in their own table, then the players table will be large. If you have a lot of data objects, you have a lot of data objects. So, now that the obvious has been said, the question arises as to how much content will be stored in nodes that isn't player content? If you expect a lot, you could argue for normalizing the players out of the node table. On the other hand, keeping everything in one node table gives you quick and built-in access to all the functionality that comes with CCK and Views. From my own experience, Mysql can handle literally millions of rows in a single table without much effort.

Edit: On the other hand, you can make a good argument that if these nodes will have a lot of fields that are inherently Player attributes, it would be faster to store all that data in one table than making a lot of joins to bring in the CCK fields. The trade off would be you'd need a lot more development time.

  • I think you hit the nail on the head. I'm concerned about the joins with CCK fields because the fields are definitely player-associated and not related to content as we typically use in a CMS. Commented Mar 13, 2011 at 2:17

Drupal 6 has a module called League Site that might be useful to have a look at... I don't think it has been ported to 7 yet but it has an awful lot of functionality for league sports right out of the box.

  • Yeah, I've started to analyze that one. I'm just concerned that the nodes (at first glance) are all in one table. I think separation of entities is warranted for a variety of reasons. Commented Mar 13, 2011 at 2:19

I'm actually building a similar fantasy sports game thingy using Drupal and I gotta say I don't regret it one bit. The main advantage as far as I'm concerned is being able to abstract tons of the heavy-lifting by using standard Drupal functionality and then using custom modules to glue things together when necessary and add extra stuff.

Using nodes and node references helps organize your game and makes interacting with and manipulating the data much easier and using views for example makes finding what you want and displaying it a million times easier too.

Do it! It will give you a huge productivity boost and if you know your way around a couple hooks you should be able to fill in the blanks for stuff Drupal won't give you that easily.

  • Very cool, Alex. A buddy and I are trying to set up an open source fantasy sports game. If you are so inclined, your input would be appreciated. scoreos.org Commented Mar 13, 2011 at 2:16
  • Also, we met some folks at DrupalCon Chicago last week that are trying to build a system for real-life sports, but their needs are pretty similar. They seem to be a part of this Drupal Group: groups.drupal.org/sports-club-league-management Commented Mar 13, 2011 at 2:18
  • very nice! I'm glad to help however I can :)
    – Alex Weber
    Commented Mar 13, 2011 at 5:37

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.