#6148. Should database schemas be created as well?

1 view
Skip to first unread message

kmpm

unread,
Aug 17, 2009, 10:19:36 AM8/17/09
to Django developers
I'm working on issue http://code.djangoproject.com/ticket/6148 and
have some questions.

If a db_schema is defined, should it be created automatically or
should the user be required to set this up in the same fashion as he
is required to set up the database.

For postgres it might not be any trouble to create the schema within
the pre existing database but the MySQL implementation of schemas is
to create a additional database for the schema (CREATE SCHEMA is a
alias of CREATE DATABASE). This seems a bit to intrusive for my taste
and that's why I'm asking.

Also, if automatic schema creation if it doesn't exist should it be
deleted in sqlreset as well?



//Peter (KMPM)

Ian Kelly

unread,
Aug 17, 2009, 11:12:26 AM8/17/09
to django-d...@googlegroups.com
On Mon, Aug 17, 2009 at 8:19 AM, kmpm<km...@birchroad.net> wrote:
>
> I'm working on issue http://code.djangoproject.com/ticket/6148 and
> have some questions.
>
> If a db_schema is defined, should it be created automatically or
> should the user be required to set this up in the same fashion as he
> is required to set up the database.
>
> For postgres it might not be any trouble to create the schema within
> the pre existing database but the MySQL implementation of schemas is
> to create a additional database for the schema (CREATE SCHEMA is a
> alias of CREATE DATABASE). This seems a bit to intrusive for my taste
> and that's why I'm asking.

Also in Oracle, creating a schema means creating a user, which has
security implications. My opinion is that we should not be actively
meddling with schemas, just as we do not with databases, users, or
tablespaces.

Ian

Russell Keith-Magee

unread,
Aug 17, 2009, 8:08:20 PM8/17/09
to django-d...@googlegroups.com

I concur. I see schemas as a gross organizational structure, just like
the database itself. Django doesn't create the database; by extension,
I see no reason that it should create the schema either.
Implementation complications (such as those under Oracle and MySQL)
only serve to reinforce this point.

Yours,
Russ Magee %-)

kmpm

unread,
Aug 18, 2009, 2:10:09 AM8/18/09
to Django developers
It's decided then... No schema creation.

Thanks for good input and fast response...

Peter

On 18 Aug, 02:08, Russell Keith-Magee <freakboy3...@gmail.com> wrote:
> On Mon, Aug 17, 2009 at 11:12 PM, Ian Kelly<ian.g.ke...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages