Hi guys,

I've done some programming, but I'm new to RDBMS and ORMs. I've read
some documentation, but before diving in deeper and doing some
tutorials, I'm trying to understand what can be done with SQLAlchemy
and get a coarse understanding of how it works.

Imagine some tables which are all related (like 'created by') to a
user by a foreign key. If I query all tables by a certain user, I
assume SQLAlchemy loads and creates all objects which have references
in the column 'created by' to the certain user. Like a 'manual' eager
loading. If I use the objects properties to follow the relations, does
SQLA need to perform any more DB accesses? Or are the referenced
objects directly referenced (maybe with properties that stores the
direct reference after resolving after the first call)?

How about backrefs? Would every call to those require a new SQL query
under the hood? Or are those 'stored' in the ORM after the first call?
I guess this would impact how to model parent-children relations. On
the one hand it seems like an easy life to me if the parents don't
need references to the children in the database, as children could be
added without modifing the parents. One the other hand, how's the
performance impact if you need to get the children by backref calls?

Cheers,

Jan

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to