Re: django workaround for multiple primary keys or sqlalchemy

2013-07-30 Thread Tom Evans
On Mon, Jul 29, 2013 at 10:04 PM, Bill Freeman wrote: > Its not clear to me whether unique_together will make there be an index, so > it might be slow. unique_together implies a multi part index - it's the only way it could be reasonably implemented. Cheers Tom -- You

Re: django workaround for multiple primary keys or sqlalchemy

2013-07-29 Thread Guy Tamir
Great thanks for the helpful reply! I'll use the Django ORM like you suggested, that was my gut filling anyways.. Thanks! On Monday, July 29, 2013 3:09:56 PM UTC-4, Justin Michalicek wrote: > > I would go with the Django ORM and just add a unique_together for a > multiple column uniqueness

Re: django workaround for multiple primary keys or sqlalchemy

2013-07-29 Thread Bill Freeman
Its not clear to me whether unique_together will make there be an index, so it might be slow. On Mon, Jul 29, 2013 at 3:09 PM, Justin Michalicek wrote: > I would go with the Django ORM and just add a unique_together for a > multiple column uniqueness constraint. That

Re: django workaround for multiple primary keys or sqlalchemy

2013-07-29 Thread Justin Michalicek
I would go with the Django ORM and just add a unique_together for a multiple column uniqueness constraint. That index won't be your primary key, but it will still be a unique index. I've even gone as far as to use custom .sql files (which manage.py syncdb runs) and custom sql in South

django workaround for multiple primary keys or sqlalchemy

2013-07-29 Thread Guy Tamir
Hi all, i'm fairly new to Django and i have a question regarding the best practice for a situation i've got. I'm working on a new project and after designing my ERD I know i need a few tables to have multiple primary keys and one table with triple primary keys. after reading about the subject