db-ddlutils-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Dudziak <tom...@gmail.com>
Subject Re: Suggestions for Derby description on DdlUtils web site
Date Sat, 26 Nov 2005 21:03:13 GMT
On 11/26/05, Jean T. Anderson <jta@bristowhill.com> wrote:

> Here are a couple corrections/suggestions for the Derby info on this page:
>
> http://db.apache.org/ddlutils/database-support.html#Cloudscape%2FDerby
>
> (1) A picky comment regarding this (feel free to ignore):
>
>   "The Apache Derby project is based upon Cloudscape."
>
> Actually, Cloudscape is based on Apache Derby.
>
> Longer explanation: Apache Derby started off with a copy of the
> Cloudscape source code; but, moving forward, Cloudscape is based on the
> Apache Derby codeline.

Yes, it can be misunderstood. I'll clarify that Derby is based upon
IBM's contribution of the Cloudscape 10 codebase.

> (2) "The SQL syntax and datatypes supported by Derby are described in
> the Datatypes section in the Reference Manual". The link for the
> Reference Manual is broken:
>
> http://incubator.apache.org/derby/manuals/reference/sqlj02.html#Reference+Manual
>
> Either of these will get you to the Reference Manual (the first would
> allow accessing the Reference Manual for any release):
>
>     http://db.apache.org/derby/manuals/index.html
>     http://db.apache.org/derby/docs/dev/ref/

You're right, the links aren't updated yet.

> (3) "NULL is explicitly specified as default value" -- currently set to
> "no".
>
> Maybe I'm misunderstanding what is meant.  You can explicitly specify a
> default of NULL:
>
> ij> create table foo (bar int default NULL);
> 0 rows inserted/updated/deleted

No, that says whether NULL *must* be specified as the DEFAULT value if
none is desired. I'll clarify that in the description.

>
> (4) "Foreign key definitions embedded in table definition" -- currently
> set to "no", but Derby does support this. Here's an example from
> http://db.apache.org/derby/docs/dev/ref/rrefsqlj13590.html :
>
> CREATE TABLE FLTAVAIL
>         (
>         FLIGHT_ID CHAR(6) NOT NULL,
>         SEGMENT_NUMBER INT NOT NULL,
>         FLIGHT_DATE DATE NOT NULL,
>         ECONOMY_SEATS_TAKEN INT,
>         BUSINESS_SEATS_TAKEN INT,
>         FIRSTCLASS_SEATS_TAKEN INT,
>         CONSTRAINT FLTAVAIL_PK PRIMARY KEY (FLIGHT_ID, SEGMENT_NUMBER),
>         CONSTRAINT FLTS_FK
>         FOREIGN KEY (FLIGHT_ID, SEGMENT_NUMBER)
>         REFERENCES Flights (FLIGHT_ID, SEGMENT_NUMBER);

Yes, but external foreignkeys are preferable because otherwise it's
impossible to create schemas with circular references. The entry does
not specify whether the database is able to do internal foreignkeys,
but rather whether DdlUtils uses internal or external foreignkeys.

regards,
Tom

Mime
View raw message