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 -> building Oracle database model with ERwin - NOT NULL columns

building Oracle database model with ERwin - NOT NULL columns

From: Greg <gresmi_at_yahoo.com>
Date: 7 Apr 2002 11:28:27 -0700
Message-ID: <235e2288.0204071028.7b0fdf9a@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 - 13:28:27 CDT

Original text of this message

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