tags:

views:

50

answers:

2

Hello, i'm thinking about learning ORM stuff but i think one thing: if i have a table (or some joined tables) with millions of records .... is it good to have mapped objects with millions of items ??? Is it sane to handle so big objects??

Thanks ! c.

A: 

is it good to have mapped objects with millions of items ???

No, it's better to keep such relations unidirectional unless you have enough memory to hold all the rows in your RAM.

Timo Westkämper
A: 

It really depends on what you will be doing with these objects; having a large number of them isn't by itself a reason to use ORM or not.

It might be more important to handle records in an object-oriented fashion so that business logic can be reliably performed on them. Or conversely, if performance is a bigger issue then keeping things lighter might be preferable. ORM is just a tool with its pros and cons; you need to decide if the benefits of using that tool outweigh the disadvantages.

maerics