Create faqs account with password faqs in Oracle10g
Express Edition. This must be done after you log in as SYSTEM user. Then create
tables and sequences listed below after connecting to Oracle as faqs
create table users
( userid number(5) constraint users_uname_pk primary key,
username varchar2(10) unique not null,
password varchar2(10) not null,
email varchar2(50) unique,
joinedon date,
profile varchar2(200)
);
create sequence sq_userid nocache;
create table topics
( topicid number(2) primary key,
topictitle varchar2(50) not null,
addedon date
);
create sequence sq_topicid nocache;
insert into topics values ( sq_topicid.nextval, 'Java Language', sysdate);
insert into topics values ( sq_topicid.nextval, 'JDBC', sysdate);
insert into topics values ( sq_topicid.nextval, 'JSF', sysdate);
create table faqs
( faqid number(5) primary key,
question varchar2(200) not null,
answer varchar2(1000) not null,
postedby number(5) references users(userid),
topicid number(2) references topics(topicid),
postedon date
);
create sequence sq_faqid nocache;