All the ORM really cares about is that the tables that you map classes to
have some combination of columns that will uniquely identify each row.
Normally that will be the table's primary key, but it doesn't have to be.

That's the only restriction on the ORM that comes to mind.

Hope that helps,

Simon

On 22 Jan 2014, at 23:35, Ni Wesley <[email protected]> wrote:

I mean sqlalchemy ORM, that is, use python class mapping to database table.

I know sqlalchemy core expression does work, this guy doesn't care how
database is created.

Wesley
2014年1月22日 下午7:04于 "Simon King" <[email protected]>写道:

> On Wed, Jan 22, 2014 at 3:41 AM, Ni Wesley <[email protected]> wrote:
> > Hi guys,
> >    I have a question here.
> > Just as the title, I mean, for example:
> >
> > I am using mysql as the database engine.
> > Now, I use sqlalchemy ORM to map python class to database table.
> >
> > My question is here:
> > Actually, there are specified teams to do the database design and tables
> > creation work.
> > Which means that, I won't sync table structures from sqlalchemy something
> > like from session.create_all().
> >
> > So,if I keep my model class synced with the database table structure,
> can I
> > still use ORM operations, say, session.query(Class), session.add,
> > session.commit .etc
> >
>
> Yes, absolutely. SQLAlchemy doesn't care how the database was created.
> You should be able to use all the normal operations on a database
> created by some other means.
>
> Hope that helps,
>
> Simon
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "sqlalchemy" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/sqlalchemy/l94LE3Am2f8/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/sqlalchemy.
> For more options, visit https://groups.google.com/groups/opt_out.
>
 --
You received this message because you are subscribed to the Google Groups
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sqlalchemy.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to