超級管理員表建立語句如下:
create table t_admin( id integer, username varchar(100), password varchar(100));insert into t_admin(id,username,password) values(1,'admin','123456');--超級管理員欄位加註釋comment on column t_admin.id is '主鍵';comment on column t_admin.username is '超級管理員帳號';comment on column t_admin.password is '超級管理員密碼';--超級管理員表加註釋comment on table t_admin is '超級管理員';
輔導員表建立語句如下:
create table t_fdy( id integer, username varchar2(100), password varchar2(100), fdyName varchar2(100), age varchar2(100), sex varchar2(100), phone varchar2(100));--輔導員欄位加註釋comment on column t_fdy.id is '主鍵';comment on column t_fdy.username is '帳號(真實姓名)';comment on column t_fdy.password is '密碼';comment on column t_fdy.fdyName is '輔導員名稱';comment on column t_fdy.age is '年齡';comment on column t_fdy.sex is '性別';comment on column t_fdy.phone is '電話';--輔導員表加註釋comment on table t_fdy is '輔導員';
課程表建立語句如下:
create table t_kc( id integer, kcName varchar2(100), num varchar2(100), kcxz varchar2(100), xf varchar2(100), xs varchar2(100), sy varchar2(100), kkxq varchar2(100), jffs varchar2(100), sj varchar2(100), dd varchar2(100));--課程欄位加註釋comment on column t_kc.id is '主鍵';comment on column t_kc.kcName is '課程名稱';comment on column t_kc.num is '課程編號';comment on column t_kc.kcxz is '課程性質';comment on column t_kc.xf is '學分';comment on column t_kc.xs is '學時';comment on column t_kc.sy is '實驗';comment on column t_kc.kkxq is '開課學期';comment on column t_kc.jffs is '記分方式';comment on column t_kc.sj is '時間';comment on column t_kc.dd is '地點';--課程表加註釋comment on table t_kc is '課程';
課程上課記錄表建立語句如下:
create table t_kcsk( id integer, kcId integer, studentId integer, types varchar2(100), insertDate date, bjName varchar2(100));--課程上課記錄欄位加註釋comment on column t_kcsk.id is '主鍵';comment on column t_kcsk.kcId is '課程';comment on column t_kcsk.studentId is '學生';comment on column t_kcsk.types is '缺課或在課';comment on column t_kcsk.insertDate is '點名時間';comment on column t_kcsk.bjName is '';--課程上課記錄表加註釋comment on table t_kcsk is '課程上課記錄';
通知表建立語句如下:
create table t_message( id integer, title varchar2(100), content varchar2(100), showDate varchar2(100));--通知欄位加註釋comment on column t_message.id is '主鍵';comment on column t_message.title is '標題';comment on column t_message.content is '內容';comment on column t_message.showDate is '日期';--通知表加註釋comment on table t_message is '通知';
學生表建立語句如下:
create table t_student( id integer, username varchar2(100), password varchar2(100), studentName varchar2(100), bj varchar2(100), xh varchar2(100), sex varchar2(100), age varchar2(100), phone varchar2(100), zw varchar2(100), zp varchar2(100), status varchar2(100));--學生欄位加註釋comment on column t_student.id is '主鍵';comment on column t_student.username is '帳號(真實姓名)';comment on column t_student.password is '密碼';comment on column t_student.studentName is '姓名';comment on column t_student.bj is '班級';comment on column t_student.xh is '學號';comment on column t_student.sex is '性別';comment on column t_student.age is '年齡';comment on column t_student.phone is '電話';comment on column t_student.zw is '職務';comment on column t_student.zp is '照片';comment on column t_student.status is '';--學生表加註釋comment on table t_student is '學生';
老師表建立語句如下:
create table t_teacher( id integer, username varchar2(100), password varchar2(100), teacherName varchar2(100), age varchar2(100), sex varchar2(100), phone varchar2(100));--老師欄位加註釋comment on column t_teacher.id is '主鍵';comment on column t_teacher.username is '帳號(真實姓名)';comment on column t_teacher.password is '密碼';comment on column t_teacher.teacherName is '老師名稱';comment on column t_teacher.age is '年齡';comment on column t_teacher.sex is '性別';comment on column t_teacher.phone is '電話';--老師表加註釋comment on table t_teacher is '老師';
oracle特有,對應序列如下:
create sequence s_t_fdy;create sequence s_t_kc;create sequence s_t_kcsk;create sequence s_t_message;create sequence s_t_student;create sequence s_t_teacher;
輔導員javaBean建立語句如下:
package project.model;import org.springframework.format.annotation.DateTimeFormat;import java.util.Date;//輔導員public class Fdy extends BaseBean{//主鍵private Integer id;public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}//帳號(真實姓名)private String username;//密碼private String password;//輔導員名稱private String fdyName;//年齡private String age;//性別private String sex;//電話private String phone;public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public String getFdyName() {return fdyName;}public void setFdyName(String fdyName) {this.fdyName = fdyName;}public String getAge() {return age;}public void setAge(String age) {this.age = age;}public String getSex() {return sex;}public void setSex(String sex) {this.sex = sex;}public String getPhone() {return phone;}public void setPhone(String phone) {this.phone = phone;}}
課程javaBean建立語句如下:
package project.model;import org.springframework.format.annotation.DateTimeFormat;import java.util.Date;//課程public class Kc extends BaseBean{//主鍵private Integer id;public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}//課程名稱private String kcName;//課程編號private String num;//課程性質private String kcxz;//學分private String xf;//學時private String xs;//實驗private String sy;//開課學期private String kkxq;//記分方式private String jffs;//時間private String sj;//地點private String dd;public String getKcName() {return kcName;}public void setKcName(String kcName) {this.kcName = kcName;}public String getNum() {return num;}public void setNum(String num) {this.num = num;}public String getKcxz() {return kcxz;}public void setKcxz(String kcxz) {this.kcxz = kcxz;}public String getXf() {return xf;}public void setXf(String xf) {this.xf = xf;}public String getXs() {return xs;}public void setXs(String xs) {this.xs = xs;}public String getSy() {return sy;}public void setSy(String sy) {this.sy = sy;}public String getKkxq() {return kkxq;}public void setKkxq(String kkxq) {this.kkxq = kkxq;}public String getJffs() {return jffs;}public void setJffs(String jffs) {this.jffs = jffs;}public String getSj() {return sj;}public void setSj(String sj) {this.sj = sj;}public String getDd() {return dd;}public void setDd(String dd) {this.dd = dd;}}
課程上課記錄javaBean建立語句如下:
package project.model;import org.springframework.format.annotation.DateTimeFormat;import java.util.Date;//課程上課記錄public class Kcsk extends BaseBean{//主鍵private Integer id;public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}//課程private Integer kcId;//學生private Integer studentId;//缺課或在課private String types;//點名時間private Date insertDate;//private String bjName;public Integer getKcId() {return kcId;}public void setKcId(Integer kcId) {this.kcId = kcId;}public Integer getStudentId() {return studentId;}public void setStudentId(Integer studentId) {this.studentId = studentId;}public String getTypes() {return types;}public void setTypes(String types) {this.types = types;}public Date getInsertDate() {return insertDate;}public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}public String getBjName() {return bjName;}public void setBjName(String bjName) {this.bjName = bjName;}}
通知javaBean建立語句如下:
package project.model;import org.springframework.format.annotation.DateTimeFormat;import java.util.Date;//通知public class Message extends BaseBean{//主鍵private Integer id;public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}//標題private String title;//內容private String content;//日期private String showDate;public String getTitle() {return title;}public void setTitle(String title) {this.title = title;}public String getContent() {return content;}public void setContent(String content) {this.content = content;}public String getShowDate() {return showDate;}public void setShowDate(String showDate) {this.showDate = showDate;}}
學生javaBean建立語句如下:
package project.model;import org.springframework.format.annotation.DateTimeFormat;import java.util.Date;//學生public class Student extends BaseBean{//主鍵private Integer id;public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}//帳號(真實姓名)private String username;//密碼private String password;//姓名private String studentName;//班級private String bj;//學號private String xh;//性別private String sex;//年齡private String age;//電話private String phone;//職務private String zw;//照片private String zp;//private String status;public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public String getStudentName() {return studentName;}public void setStudentName(String studentName) {this.studentName = studentName;}public String getBj() {return bj;}public void setBj(String bj) {this.bj = bj;}public String getXh() {return xh;}public void setXh(String xh) {this.xh = xh;}public String getSex() {return sex;}public void setSex(String sex) {this.sex = sex;}public String getAge() {return age;}public void setAge(String age) {this.age = age;}public String getPhone() {return phone;}public void setPhone(String phone) {this.phone = phone;}public String getZw() {return zw;}public void setZw(String zw) {this.zw = zw;}public String getZp() {return zp;}public void setZp(String zp) {this.zp = zp;}public String getStatus() {return status;}public void setStatus(String status) {this.status = status;}}
老師javaBean建立語句如下:
package project.model;import org.springframework.format.annotation.DateTimeFormat;import java.util.Date;//老師public class Teacher extends BaseBean{//主鍵private Integer id;public Integer getId() {return id;}public void setId(Integer id) {this.id = id;}//帳號(真實姓名)private String username;//密碼private String password;//老師名稱private String teacherName;//年齡private String age;//性別private String sex;//電話private String phone;public String getUsername() {return username;}public void setUsername(String username) {this.username = username;}public String getPassword() {return password;}public void setPassword(String password) {this.password = password;}public String getTeacherName() {return teacherName;}public void setTeacherName(String teacherName) {this.teacherName = teacherName;}public String getAge() {return age;}public void setAge(String age) {this.age = age;}public String getSex() {return sex;}public void setSex(String sex) {this.sex = sex;}public String getPhone() {return phone;}public void setPhone(String phone) {this.phone = phone;}}