The flush() method synchronizes the session state with the database, executing all pending SQL statements. commit() commits the transaction, close() closes the session, and list() returns query results. flush() is what actually ensures SQL execution.