Re: About database composite keys.

2011-03-23 Thread Derek
On Mar 22, 12:31 pm, Andre Lopes  wrote:
> Hi,
>
> I'm new to Django and I have some doubts about the Database Design. I
> design Databases two years from now but I'm not accustomed to design
> databases without composite keys.
>
> I have read that Django does not support composite keys. True?
>
> How is the philosophy of database design in Django... All the tables
> must to have one sequence(in PostgreSQL) for the PK and use unique
> keys to do the same that a composite key does?
>
> Do you recommend some Database Design readings about Django?
>

See:
http://code.djangoproject.com/wiki/MultipleColumnPrimaryKeys
http://www.codekoala.com/blog/2008/using-django-design-your-database-schema/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: About database composite keys.

2011-03-22 Thread Kenneth Gonsalves
On Tue, 2011-03-22 at 10:31 +, Andre Lopes wrote:
> I have read that Django does not support composite keys. True?

afaik the devs are working on composite keys - but it is not there yet
> 
> How is the philosophy of database design in Django... All the tables
> must to have one sequence(in PostgreSQL) for the PK and use unique
> keys to do the same that a composite key does? 

there is a workaround called unique_together that fits most use cases
(though not all)
-- 
regards
KG
http://lawgon.livejournal.com
Coimbatore LUG rox
http://ilugcbe.techstud.org/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



About database composite keys.

2011-03-22 Thread Andre Lopes
Hi,

I'm new to Django and I have some doubts about the Database Design. I
design Databases two years from now but I'm not accustomed to design
databases without composite keys.

I have read that Django does not support composite keys. True?

How is the philosophy of database design in Django... All the tables
must to have one sequence(in PostgreSQL) for the PK and use unique
keys to do the same that a composite key does?

Do you recommend some Database Design readings about Django?

Best Regards,

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.