[thesite] aeo, voting app and Oracle

Warden, Matt mwarden at mattwarden.com
Tue Jul 10 13:05:44 CDT 2001


Dan,

Walker has been kind enough to port the DB scripts to Oracle and I've
changed the code to use the sequences and have stored that in
/home/mwarden/admin_html (it's only the voting files, not the entire
admin_html). I notice the voting app is still not working and I was
wondering if you saw the emails about this. If not, here's walker's script:

CREATE TABLE questions (
         question_id number NOT NULL,
         question_name varchar2 (50) NULL ,
         question text NULL,
         user_id varchar2 (50),
         dateadded date,
         active number NOT NULL,
         CONSTRAINT questions_pk PRIMARY KEY (question_id)
)
STORAGE(INITIAL 5M NEXT 5M);

CREATE TABLE choices (
         choice_id number NOT NULL,
         question_id number NULL ,
         choice_name varchar2 (50) NULL ,
         choice text NULL ,
         choice_order number NULL ,
         active number NOT NULL ,
         CONSTRAINT choice_pk PRIMARY KEY (choice_id),
         FOREIGN KEY (question_id) REFERENCES questions (question_id)
)
STORAGE(INITIAL 5M NEXT 5M);

CREATE TABLE responses (
         response_id number NOT NULL auto_increment,
         choice_id number NULL ,
         question_id number NULL ,
         user_ip varchar2 (50),
         user_id varchar2 (50),
         active number NOT NULL ,
         CONSTRAINT responses_pk PRIMARY KEY (response_id),
         FOREIGN KEY (question_id) REFERENCES questions (question_id)
         FOREIGN KEY (choice_id) REFERENCES choices (choice_id)
)
STORAGE(INITIAL 5M NEXT 5M);

create sequence CHOICE_ID_SEQ increment by 1 start with 1;
create sequence QUESTION_ID_SEQ increment by 1 start with 1;
create sequence RESPONSE_ID_SEQ increment by 1 start with 1;




Now would be the time to change this so we don't have to worry about
migrating data.



Thanks,


--
mattwarden
mattwarden.com






More information about the thesite mailing list