db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ōystein GrÝvlen" <Oystein.Grov...@sun.com>
Subject Schema issues?
Date Wed, 13 Apr 2005 12:14:51 GMT

I have a few questions to the following ij-session:

ij version 10.1
ij> connect 'jdbc:derby:TestDB;create=true;user="user1";password="user1"';
ij> create table testschema.testtab(num int, addr varchar(40));
0 rows inserted/updated/deleted
ij> insert into testtab2 values(7000, 'TRONDHEIM');
ERROR 42Y07: Schema 'user1' does not exist

 - Derby seems to automatically create schemas that are referred by
   create table.  Is this according to the standard?  I think this
   behavior is problematic since mis-spellings of schema names will
   not be caught.

 - I would expect "Table 'testtab2' does not exist" for the insert
   statement.  I guess what happens here is that Derby tries to find
   the table in the default schema which is 'user1' since I am
   connected as this user.  It then discovers that this schema does
   not exists and flag this error.  In my opinion, the error message
   is confusing and should be considered a bug.  I can create a Jira
   issue for this, but I would like to hear what other people think.

 - In my opinion, a default schema should be created by default.  Is
   there any particular reason for not doing so?

ōystein GrÝvlen, Senior Staff Engineer
Sun Microsystems, Database Technology Group
Trondheim, Norway

View raw message