[nycphp-talk] ORM anyone?

LK lk613m at
Tue Sep 11 15:49:07 EDT 2007

Please help me in overcoming a mental block about this wonderful thing called ORM. 
By reading some examples on using ORM, such as setting up Author/Books parent/child objects, I notice that each author and each book has to be individually assigned in the PHP script and saved. This is what I don't understand, 
1. if my database contains thousands of authors and 100's of thousands of books, I have to 1) create each new object 2) assign each field value to it and 3) save it, and do this for 100's of thousands of records? Somehow that just does not make sense, since the records are already in the database, why do I have to save(..) them again?
2. If I have an existing database with 100's of thousands of rows already populated, how does ORM know which record corresponds to which php object? In other words, how do I just start using existing mysql records as php objects?
3. If an existing database has many relations between tables, how do I form complex joins between them using ORM?
Thanks for your response

Shape Yahoo! in your own image.  Join our Network Research Panel today! 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the talk mailing list