DB: working with databases

11 views
Skip to first unread message

Tanuja

unread,
Sep 25, 2011, 12:02:20 PM9/25/11
to django...@googlegroups.com
Is it possible to work with databases in the "traditional" way? I mean:
  • Design, create, manage the database natively
  • Have batch processes to insert and mange data
  • Connect this data to a django-based website
What tools are there to do this? Is this an inefficient approach in the django world?

Alternatively, if I create the database using model.py:
  • Then need to make changes to the database as we go along, without deleting data, how can this be done?
  • How do I define triggers, indexes, etc in model.py?

Thanks much. I am a newbie. Clearly.

Xavier Ordoquy

unread,
Sep 25, 2011, 12:13:55 PM9/25/11
to django...@googlegroups.com
Hi,

Database will be better designed if you let django orm create them first and you add your tuning after.

However, you can still work with non Django generated database. django-extensions application even provides an inspectdb that will guess most of your models from the database schema.

Regards,
Xavier,
Linovia.


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

Russell Keith-Magee

unread,
Sep 25, 2011, 7:48:33 PM9/25/11
to django...@googlegroups.com
On Mon, Sep 26, 2011 at 12:13 AM, Xavier Ordoquy <xord...@linovia.com> wrote:
> Hi,
> Database will be better designed if you let django orm create them first and
> you add your tuning after.
> However, you can still work with non Django generated database.
> django-extensions application even provides an inspectdb that will guess
> most of your models from the database schema.

Erm... *Django* provides inspectdb, not django-extensions. It's part
of Django's core.

Yours,
Russ Magee %-)

Xavier Ordoquy

unread,
Sep 26, 2011, 1:38:43 AM9/26/11
to django...@googlegroups.com

My bad, I apologizes for that.
This being said, on the topic:
https://docs.djangoproject.com/en/1.3/howto/legacy-databases/

Regards,
Xavier,
Linovia.

Uros Trebec

unread,
Sep 27, 2011, 10:16:56 AM9/27/11
to Django users
You can upgrade the "inspectdb" result with Django Autoadmin (
https://github.com/bancek/django-autoadmin ) which generates necessary
basic AdminModel classes on the fly, without the need for manual
definition and/or Django-specific DB tables (auth, for example).

This way you can be up and running even faster.

Regards,
UT

On Sep 25, 6:13 pm, Xavier Ordoquy <xordo...@linovia.com> wrote:
> Hi,
>
> Database will be better designed if you let django orm create them first and you add your tuning after.
>
> However, you can still work with non Django generated database. django-extensions application even provides an inspectdb that will guess most of your models from the database schema.
>
> Regards,
> Xavier,
> Linovia.
>
> Le 25 sept. 2011 à 18:02, Tanuja a écrit :
>
>
>
>
>
>
>
> > Is it possible to work with databases in the "traditional" way? I mean:
> > Design, create, manage the database natively
> > Have batch processes to insert and mange data
> > Connect this data to a django-based website
> > What tools are there to do this? Is this an inefficient approach in the django world?
>
> > Alternatively, if I create the database using model.py:
> > Then need to make changes to the database as we go along, without deleting data, how can this be done?
> > How do I define triggers, indexes, etc in model.py?
>
> > Thanks much. I am a newbie. Clearly.
>
> > --
> > You received this message because you are subscribed to the Google Groups "Django users" group.
> > To view this discussion on the web visithttps://groups.google.com/d/msg/django-users/-/AvAVd3SH0JsJ.
Reply all
Reply to author
Forward
0 new messages