Tuesday, October 29, 2013

Re: Django ManyToMany performance?

On Mon, Oct 28, 2013 at 8:23 PM, Ruturaj Dhekane <ruturajmd@gmail.com> wrote:
> Thanks Daniel and Robin.
>
> Have we seen the scales where Many-to-many DBs through Django work well?
> Like 50K articles in 5K publications.

Numbers are really meaningless. One of our legacy products has a
database with 300 million rows in it, it works as well in Django as it
does in C++, because what the application connecting to the database
"is" is largely irrelevant, what matters is what it does to the
database.

> The aim of this question was to make a design choice too - whether I should
> use Django constructs/calls directly or should i write my own SQL to make
> queries - as my schemas are not just many-to-many but a lot more than that.
>
> Thanks for the suggestion on getting the DB schemas reviewed by a DB expert.
> I realized that is going to help me a lot for sure!

Almost anything you can express in a RDBMS DDL can be encapsulated as
a django model - probably the only major outstanding issue is multi
column primary keys. Using django or using direct SQL on the same
schema will produce identical results.

Besides which, django does not restrict you from using SQL, which is
sometimes necessary - whilst django covers most of SQL as DDL, there
are many many DML SQL queries that you cannot express in django's ORM.

(DDL = Data Definition Language, DML = Data Manipulation Language, in
case any of those terms are unclear)

Cheers

Tom

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFHbX1Lr9CMCgoLrfHS%3DX-WKrbEOMa0640nWwNi_yJ5E_iMkRw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.

No comments:

Post a Comment