On Sat, Jun 8, 2013 at 2:11 AM, enemytet <dominikan...@gmail.com> wrote:
> I learn dynamic models in Django but I don't understand when to use them. > > What are the best examples of the use of dynamic models? (real situation) > My advice - Don't. Ever. If you find yourself in a situation where you thing you need to use a dynamic model, you've almost certainly either misunderstood your problem, done some bad analysis of your required schema, or made a poor choice of data store. Relational databases aren't optimised for live changes to schema. You *can* modify schema -- but that doesn't mean you should architect your solution on that basis. If you find your needs for data storage are changing, then you either need to restructure your schema to abstract the dynamic components, or use a data store that is better suited to dynamic constraints - for example, a document-based store, or key-value store. The "right" solution will depend entirely on your problem space. There are exceptions to this rule, but they are just that -- exceptions. The vast majority of applications don't require dynamic models, and unless you *really* understand how a relational database will handle the sorts of changes that a dynamic schema will require, you'd be well served to avoid them. Yours, Russ Magee %-) -- 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+unsubscr...@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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.