I have a database in which i have a huge table, when i retrieve data from this table in need to split the data into a few classes (think of them as some kind of categories) instead of a class that is mapped to the table. There is an simple easy to do this? Would be better recieve all that data from the database into the class mapped to the table and the split it?
EDIT: I forgot to mention this: which one would be more efficient?
Example:
myTable
-------------------------------------------------------------------------------------------
id | someInt 1| some varchar[ ] | etc some cols... |Date| some other int|some other varchar
-------------------------------------------------------------------------------------------
^ ^ ^ ^
|______________________________| |_____________________________________|
Category 1 (ClassA) Category n(ClassN)