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: H. ROMDHANE Mohamed <romdane_at_noos.fr>
Date: Mon, 8 Apr 2002 06:57:13 +0200
Message-ID: <3cb12139$0$13681$79c14f64@nan-newsreader-03.noos.net>


Do not bother if it is not (NOT NULL) then it is NULL.

If you don't put NULL it is NULL by default meaning that it accepts NULLs and not all the column is to be filled with NULLs.

The contrary happens with SQLserver by default it is NOT NULL as stated otherwise.

So keep going, because there is no trick to avoid what you call unless you go to the define files of Oracle which is beyond this forum.

I hope it can helps !

Mohamed

"Greg" <gresmi_at_yahoo.com> a écrit dans le message de 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:57:13 CDT

Original text of this message

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