Skip to content
Andrew Gallant edited this page Sep 11, 2013 · 19 revisions

One of the goals of nfldb is for it to be simple to use. And for it to be simple to use, the data model should also be simple.

There are only 7 tables in the database. Here is a brief description of each:

  • meta stores information about the database or about the state of the world. For example, it keeps track of the version of the database and the current week of the current NFL season.
  • team stores a row for each team in the league. There is also a row that corresponds to an unknown team called UNK. This is used for players that are not on any current roster.
  • player stores ephemeral data about players. Namely, it is the most current information about each player known by nfldb. The data is nearly a total copy of the data in nflgame's JSON player database.
  • game stores a row for each NFL game in the preseason, regular season and postseason dating back to 2009. This includes games that are scheduled in the future but have not been played.
  • drive stores a row for each drive in a single game.
  • play stores a row for each play in a single drive.
  • play_player stores a row for each player statistic in a single play.

You can gets an overview of the entire database and the relationships between each table with a condensed Entity-Relationship (ER) diagram:

Shortened ER diagram for nfldb

The full ER diagram, with all of the statistical categories, is also available:

Full ER diagram for nfldb