On Dec 16, 2011, at 7:32 PM, Vlad K. wrote: > > So basically, if I'm understanding the docs correctly, and what you just > wrote: > > Using the session object does not mean using the ORM.
more or less....though if I wrote a program that had no ORM usage whatsoever I'm not sure I'd have Session in it. But I could. > The ORM comes in play with Mapper and Mapped instances, which in turn require > a primary key defined. So, I can use session.execute() to do non-ORM > querying? And ResultProxy to work with returned data? yeah execute() goes right to connection.execute and connection() will give you the same kind of Connection you get from an Engine. > > How would I autocreate the tables if I don't use Mapping, with DDL events and > pure SQL? tables are generated using create_all() on MetaData you can pass the connection in: metadata.create_all(session.connection()) The tables/DDL/pure SQL represent structures within a database. To actually transmit these constructs as instructions to a DB you just need a data pipe (which in reality is some system that goes over TCP/IP to your database server). Session is essentially a pipe around the Connection, which is the most "direct" pipe in SQLAlchemy to the database. -- 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.