Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: building Oracle database model with ERwin - NOT NULL columns

Re: building Oracle database model with ERwin - NOT NULL columns

From: Ray Teale <ray_at_BLAHholly.com.au>
Date: Mon, 8 Apr 2002 14:02:24 +1000
Message-ID: <nD8s8.1568$qg.164936@ozemail.com.au>


Hi Greg

I don't understand why you would wish to turn it off. A column either allows nulls (NULL) or doesn't (NOT NULL).

Regards

Ray
"Greg" <gresmi_at_yahoo.com> wrote in message news:235e2288.0204071028.7b0fdf9a_at_posting.google.com...
> I'm hoping someone can help me with a question I have
> about ERwin and Oracle. I've used the ERwin tool to some
> extent working on an existing data warehouse
> database, and I'm now working on my first Oracle
> database from scratch. I'm nearing completion of the logical and
> physical model and have generated the sql report a
> couple of times to check progress.
>
> My question is this:
> If I define a column as "NOT NULL", ERwin handles that
> just fine. However, for every other column created,
> ERwin sets it as "NULL". Is that needed? And, if not,
> is there a way to turn that off?
> I'm using ERwin version 3.5 and I have the server set
> as Oracle 8.x.
>
> Thanks in advance for any help.
>
> (example below)
> ------------------------------------------------------
>
> CREATE TABLE EMPLOYEE (
> emp_num CHAR(5) NOT NULL,
> first_name VARCHAR2(20) NOT NULL,
> zipcode_id NUMBER(9) NULL,
> middle_name VARCHAR2(20) NULL,
> state_id CHAR(2) NULL,
> last_name VARCHAR2(20) NOT NULL,
> address VARCHAR2(40) NOT NULL,
> city VARCHAR2(25) NULL,
> phone NUMBER(10) NULL,
> emergency_phone_num NUMBER(10) NULL,
> zone_id CHAR(1) NULL,
> notes VARCHAR2(50) NULL,
> restriction_class CHAR(1) NULL
> CONSTRAINT
> restriction_class16
> CHECK
> (restriction_class IN ('P', 'C', 'E')),
> status CHAR(1) NULL
> CONSTRAINT
> employee_status6
> CHECK
> (status IN ('Y', 'N')),
> foreman_flag CHAR(1) NULL
> CONSTRAINT
> restriction_class17
> CHECK
> (foreman_flag IN ('P', 'C', 'E')),
> ytd_dollars_lost NUMBER(12,2) NULL,
> CONSTRAINT XPKEMPLOYEE
> PRIMARY KEY (emp_num),
> CONSTRAINT zipcode_id_emp_fk
> FOREIGN KEY (zipcode_id)
> REFERENCES ZIP_CODE,
> CONSTRAINT state_id_emp_fk
> FOREIGN KEY (state_id)
> REFERENCES STATE
> );
>
> CREATE INDEX XIF10EMPLOYEE ON EMPLOYEE
> (
> zipcode_id
> );
>
> CREATE INDEX XIF8EMPLOYEE ON EMPLOYEE
> (
> state_id
> );
Received on Sun Apr 07 2002 - 23:02:24 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US