ActiveRecord mapping of main Mediawiki entities and relationships