# Aggregate Models that don't correspond directly to DB table

**URL:** <https://www.ruby-forum.com/t/aggregate-models-that-dont-correspond-directly-to-db-table/110873>\
**Category:** Rails\
**Created:** [July 31, 2007, 6:04pm UTC](https://www.ruby-forum.com/t/aggregate-models-that-dont-correspond-directly-to-db-table/110873 "2007-07-31T18:04:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![rhinmass](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/ecc23a/32.png) [@rhinmass](https://www.ruby-forum.com/u/rhinmass)\
**Post date:** [July 31, 2007, 6:04pm UTC](https://www.ruby-forum.com/t/aggregate-models-that-dont-correspond-directly-to-db-table/110873/1 "2007-07-31T18:04:04Z")

</div>

Hello,

I am having trouble deciding whether to make some classes part of the  
model or the controller.

These objects will represent rollups of various joined database tables.  
I want to use them to build up a tree structure to make it easier to  
drill through reports compiled over hundreds of thousands of database  
rows.

I don’t want to persist the rollups. I just want to store them in the  
session hash.

I plan to use ActiveRecord::Base.connection.select\_all inside the  
objects to populate themselves.

Are these objects part of the Model or the Controller?
