create database mytestdb;
use mytestdb;
***************************
drop table unix;
drop table java;
drop table oracle;
drop table xml;
drop table jdbc;
drop table hibernate;
drop table servlet;
drop table html;
drop table jsp;
drop table struts;
drop table ajaxjsf;
drop table ooaduml;
drop table ejb;
drop table spring;
drop table webservice;
drop table plsql;
drop table examstate;
drop table state;
drop table student1;
drop table teacher;
drop table jteacher;
drop table admin;
drop table chengji;
******************************************
create table unix(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence unix_seq start with 1 increment by 1;
create table java(
id number primary key,
question varchar2(200),
opt varchar2(200),
answer varchar2(10));
create sequence java_seq start with 1 increment by 1;
create table oracle(
id number primary key,
question varchar2(200),
opt varchar2(200),
answer varchar2(10));
create sequence oracle_seq start with 1 increment by 1;
create table xml(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence xml_seq start with 1 increment by 1;
create table jdbc(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence jdbc_seq start with 1 increment by 1;
create table hibernate(
id number primary key,
question varchar2(200),
opt varchar2(200),
answer varchar2(10));
create sequence hibernate_seq start with 1 increment by 1;
create table servlet(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence servlet_seq start with 1 increment by 1;
create table html(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence html_seq start with 1 increment by 1;
create table jsp(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence jsp_seq start with 1 increment by 1;
create table struts(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence struts_seq start with 1 increment by 1;
create table ajaxjsf(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence ajaxjsf_seq start with 1 increment by 1;
create table ooaduml(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence ooaduml_seq start with 1 increment by 1;
create table ejb(
id number primary key,
question varchar2(200),
opt varchar2(200),
answer varchar2(10));
create sequence ejb_seq start with 1 increment by 1;
create table spring(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence spring_seq start with 1 increment by 1;
create table webservice(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence webservice_seq start with 1 increment by 1;
create table plsql(
id number primary key,
question varchar2(100),
opt varchar2(100),
answer varchar2(10));
create sequence plsql_seq start with 1 increment by 1;
create table examstate(
id number(5) primary key,
state number(5));
insert into examstate values(1,0);
create table state(
id number(5) primary key,
banji varchar2(10),
beizhu varchar2(100),
time date);
create sequence state_seq start with 1 increment by 1;
create table student1(
id number(5) primary key,
kaohao varchar2(10),
name varchar2(20),
banji varchar2(10),
password varchar2(20),
state number(5),
score number(5),
ip varchar2(15));
create sequence student1_seq start with 1 increment by 1;
create table teacher(
id number(5) primary key,
name varchar2(20),
password varchar2(20),
state number(5),
ip varchar2(15));
create sequence teacher_seq start with 1 increment by 1;
insert into teacher values(1,'seaside','1',1,'1');
create table jteacher(
id number primary key,
name varchar2(20),
password varchar2(20),
state number(5));
create sequence jteacher_seq start with 1 increment by 1;
insert into jteacher values(1,'seaside','1',1);
create table admin(
id number(5) primary key,
name varchar2(20),
password varchar2(20),
state number(5),
ip varchar2(15));
create sequence admin_seq start with 1 increment by 1;
insert into admin values(1,'seaside','1',1,'1');
create table chengji(
id number(5) primary key,
kaohao varchar2(20),
name varchar2(20),
banji varchar2(20),
maxscore number(5),
score number(5),
kecheng varchar2(20));
create sequence chengji_seq start with 1 increment by 1;
insert into chengji values(1,100,'tom',2,100,81,'java');
insert into chengji values(2,101,'tom1',2,100,40,'java');
insert into chengji values(3,102,'tom2',2,100,60,'java');
insert into chengji values(4,103,'tom3',2,100,90,'java');
insert into chengji values(5,104,'tom4',2,100,100,'java');
insert into chengji values(6,105,'tom5',2,100,70,'java');
create table banji(
id number(5) primary key,
name varchar2(20),
num number(5),
class varchar2(20),
time varchar2(20)
);
create sequence banji_seq start with 1 increment by 1;
create table kaohao(
id number(5) primary key,
num number(10)
);
create sequence kaohao_seq start with 1 increment by 1;