[sqlalchemy] Using Guid as Primary Key

2012-12-02 Thread Gops S
Can I use the Guid as primary key? I am newbie to sql and mysql management. I am worried about auto-generation of primary when it is defined as integer when we backup and restore the database. Can anyone throw light on using auto-increment id as primary key vs using guid string id as primary

[sqlalchemy] Application locking and SQLAlchemy

2012-12-02 Thread YKdvd
I'm starting to use SQLAlchemy to access a small, in-house database. I need to add some rudimentary concurrency handling, and just wanted to see if my general impression as to the SQLAlchemy implications are correct. As a hypothetical example, assume something like a Users table, and some

Re: [sqlalchemy] Application locking and SQLAlchemy

2012-12-02 Thread Michael Bayer
On Dec 2, 2012, at 3:29 PM, YKdvd wrote: I'm starting to use SQLAlchemy to access a small, in-house database. I need to add some rudimentary concurrency handling, and just wanted to see if my general impression as to the SQLAlchemy implications are correct. As a hypothetical example,

Re: [sqlalchemy] Using Guid as Primary Key

2012-12-02 Thread Wolfgang Keller
Can I use the Guid as primary key? I am newbie to sql and mysql management. Using such auto-generated surrogate keys is always a really bad idea and the straightest and shortest way to data inconsistency hell (especially through duplicates). Sincerely, Wolfgang -- You received this

Re: [sqlalchemy] alembic handles no primary key table

2012-12-02 Thread junepeach
THanks Werner and Michiael. Yeah ORM requires a primary key for every table. Michiael, I don't have a Metadata yet. I am creating a migration script to be shared among several databases. We will use this script to create tables schema in several databases. So, should we add a primary for this

Re: [sqlalchemy] Application locking and SQLAlchemy

2012-12-02 Thread YKdvd
D'oh! And I had just been reading the docs about a commit expiring loaded object instances, which is what the refresh() would have done. So the mere accessing of that User object instance (say, UserObj.name=newNameFromEdit, or temp=UserObj.name) would first trigger a reload of that User from

Re: [sqlalchemy] Using Guid as Primary Key

2012-12-02 Thread Michael Bayer
On Dec 2, 2012, at 4:30 PM, Wolfgang Keller wrote: Can I use the Guid as primary key? I am newbie to sql and mysql management. Using such auto-generated surrogate keys is always a really bad idea and the straightest and shortest way to data inconsistency hell (especially through

Re: [sqlalchemy] alembic handles no primary key table

2012-12-02 Thread Michael Bayer
On Dec 2, 2012, at 5:00 PM, junepeach wrote: Michiael, I don't have a Metadata yet. yes you do, your Base has one as Base.metadata So, should we add a primary for this non-primary key table? Thanks you very much! if you don't want the table having a primary key, then don't add a primary

Re: [sqlalchemy] Creating a feed related to different object type

2012-12-02 Thread Brice Leroy
Hi Eric, Thank you, I actually used this documentation (even though they are only many-to-many) and some other blog post to come up with this solution. Using 0.7 I don't have event on Mixin so I had to find an alternative to event attachment. BTW I'm pretty surprised by the speed of the event

[sqlalchemy] RE: - iPhone App To Help You Regain 20/20 Vision Naturally

2012-12-02 Thread Twenty Twenty Vision
RE: - http://isra.li/2020vision - 20/20 Vision is an iPhone app that will help you regain 20/20 vision naturally, by looking at images that relaxes your eyes and performing eye exercises that strengthen your eyes, anywhere within your busy life (i.e. office cubicle, crowded subway, waiting at