基于Web的问卷调查系统的设计与实现

基于Web的问卷调查系统的设计与实现登录注册界面

基于Web的问卷调查系统的设计与实现mysql数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '超级管理员账号',
	password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');

用户表创建语句如下:


create table t_customer(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	name varchar(100) comment '姓名',
	phone varchar(100) comment '手机',
	sex varchar(100) comment '性别',
	age varchar(100) comment '年龄',
	address varchar(100) comment '家庭住址',
	idcard varchar(100) comment '身份证',
	insertDate datetime comment '入库日期'
) comment '用户';

答案表创建语句如下:


create table t_da(
	id int primary key auto_increment comment '主键',
	wjId int comment '问卷',
	daContent varchar(100) comment '答案',
	customerId int comment '用户',
	insertDate datetime comment '时间'
) comment '答案';

轮播图表创建语句如下:


create table t_lbt(
	id int primary key auto_increment comment '主键',
	lbtPic varchar(100) comment '轮播图图片',
	link varchar(100) comment '链接地址'
) comment '轮播图';

新闻链接表创建语句如下:


create table t_link(
	id int primary key auto_increment comment '主键',
	title varchar(100) comment '标题',
	link varchar(100) comment '链接地址'
) comment '新闻链接';

问卷表创建语句如下:


create table t_wj(
	id int primary key auto_increment comment '主键',
	wjTitle varchar(100) comment '问卷内容'
) comment '问卷';

基于Web的问卷调查系统的设计与实现oracle数据库版本源码:

超级管理员表创建语句如下:


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_customer(
	id integer,
	username varchar(100),
	password varchar(100),
	name varchar(100),
	phone varchar(100),
	sex varchar(100),
	age varchar(100),
	address varchar(100),
	idcard varchar(100),
	insertDate datetime
);
--用户字段加注释
comment on column t_customer.id is '主键';
comment on column t_customer.username is '账号';
comment on column t_customer.password is '密码';
comment on column t_customer.name is '姓名';
comment on column t_customer.phone is '手机';
comment on column t_customer.sex is '性别';
comment on column t_customer.age is '年龄';
comment on column t_customer.address is '家庭住址';
comment on column t_customer.idcard is '身份证';
comment on column t_customer.insertDate is '入库日期';
--用户表加注释
comment on table t_customer is '用户';

答案表创建语句如下:


create table t_da(
	id integer,
	wjId int,
	daContent varchar(100),
	customerId int,
	insertDate datetime
);
--答案字段加注释
comment on column t_da.id is '主键';
comment on column t_da.wjId is '问卷';
comment on column t_da.daContent is '答案';
comment on column t_da.customerId is '用户';
comment on column t_da.insertDate is '时间';
--答案表加注释
comment on table t_da is '答案';

轮播图表创建语句如下:


create table t_lbt(
	id integer,
	lbtPic varchar(100),
	link varchar(100)
);
--轮播图字段加注释
comment on column t_lbt.id is '主键';
comment on column t_lbt.lbtPic is '轮播图图片';
comment on column t_lbt.link is '链接地址';
--轮播图表加注释
comment on table t_lbt is '轮播图';

新闻链接表创建语句如下:


create table t_link(
	id integer,
	title varchar(100),
	link varchar(100)
);
--新闻链接字段加注释
comment on column t_link.id is '主键';
comment on column t_link.title is '标题';
comment on column t_link.link is '链接地址';
--新闻链接表加注释
comment on table t_link is '新闻链接';

问卷表创建语句如下:


create table t_wj(
	id integer,
	wjTitle varchar(100)
);
--问卷字段加注释
comment on column t_wj.id is '主键';
comment on column t_wj.wjTitle is '问卷内容';
--问卷表加注释
comment on table t_wj is '问卷';

oracle特有,对应序列如下:


create sequence s_t_customer;
create sequence s_t_da;
create sequence s_t_lbt;
create sequence s_t_link;
create sequence s_t_wj;

基于Web的问卷调查系统的设计与实现sqlserver数据库版本源码:

超级管理员表创建语句如下:


--超级管理员
create table t_admin(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--超级管理员账号
	password varchar(100)--超级管理员密码
);
insert into t_admin(username,password) values('admin','123456');

用户表创建语句如下:


--用户表注释
create table t_customer(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--账号
	password varchar(100),--密码
	name varchar(100),--姓名
	phone varchar(100),--手机
	sex varchar(100),--性别
	age varchar(100),--年龄
	address varchar(100),--家庭住址
	idcard varchar(100),--身份证
	insertDate datetime--入库日期
);

答案表创建语句如下:


--答案表注释
create table t_da(
	id int identity(1,1) primary key not null,--主键
	wjId int,--问卷
	daContent varchar(100),--答案
	customerId int,--用户
	insertDate datetime--时间
);

轮播图表创建语句如下:


--轮播图表注释
create table t_lbt(
	id int identity(1,1) primary key not null,--主键
	lbtPic varchar(100),--轮播图图片
	link varchar(100)--链接地址
);

新闻链接表创建语句如下:


--新闻链接表注释
create table t_link(
	id int identity(1,1) primary key not null,--主键
	title varchar(100),--标题
	link varchar(100)--链接地址
);

问卷表创建语句如下:


--问卷表注释
create table t_wj(
	id int identity(1,1) primary key not null,--主键
	wjTitle varchar(100)--问卷内容
);

基于Web的问卷调查系统的设计与实现登录后主页

基于Web的问卷调查系统的设计与实现spring+springMVC+hibernate框架对象(javaBean,pojo)设计:

用户javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//用户
@Table(name = "t_customer")
public class Customer {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String name;
//手机
private String phone;
//性别
private String sex;
//年龄
private String age;
//家庭住址
private String address;
//身份证
private String idcard;
//入库日期
private Date insertDate;
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 getName() {return name;}
public void setName(String name) {this.name = name;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
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 getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}

答案javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//答案
@Table(name = "t_da")
public class Da {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//问卷
private Integer wjId;
//答案
private String daContent;
//用户
private Integer customerId;
//时间
private Date insertDate;
public Integer getWjId() {return wjId;}
public void setWjId(Integer wjId) {this.wjId = wjId;}
public String getDaContent() {return daContent;}
public void setDaContent(String daContent) {this.daContent = daContent;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}

轮播图javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//轮播图
@Table(name = "t_lbt")
public class Lbt {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//轮播图图片
private String lbtPic;
//链接地址
private String link;
public String getLbtPic() {return lbtPic;}
public void setLbtPic(String lbtPic) {this.lbtPic = lbtPic;}
public String getLink() {return link;}
public void setLink(String link) {this.link = link;}
}

新闻链接javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//新闻链接
@Table(name = "t_link")
public class Link {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//标题
private String title;
//链接地址
private String link;
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
public String getLink() {return link;}
public void setLink(String link) {this.link = link;}
}

问卷javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//问卷
@Table(name = "t_wj")
public class Wj {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//问卷内容
private String wjTitle;
public String getWjTitle() {return wjTitle;}
public void setWjTitle(String wjTitle) {this.wjTitle = wjTitle;}
}

基于Web的问卷调查系统的设计与实现spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

用户javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//用户
public class Customer  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 name;
//手机
private String phone;
//性别
private String sex;
//年龄
private String age;
//家庭住址
private String address;
//身份证
private String idcard;
//入库日期
private Date insertDate;
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 getName() {return name;}
public void setName(String name) {this.name = name;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
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 getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}

答案javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//答案
public class Da  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//问卷
private Integer wjId;
//答案
private String daContent;
//用户
private Integer customerId;
//时间
private Date insertDate;
public Integer getWjId() {return wjId;}
public void setWjId(Integer wjId) {this.wjId = wjId;}
public String getDaContent() {return daContent;}
public void setDaContent(String daContent) {this.daContent = daContent;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
}

轮播图javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//轮播图
public class Lbt  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//轮播图图片
private String lbtPic;
//链接地址
private String link;
public String getLbtPic() {return lbtPic;}
public void setLbtPic(String lbtPic) {this.lbtPic = lbtPic;}
public String getLink() {return link;}
public void setLink(String link) {this.link = link;}
}

新闻链接javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//新闻链接
public class Link  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//标题
private String title;
//链接地址
private String link;
public String getTitle() {return title;}
public void setTitle(String title) {this.title = title;}
public String getLink() {return link;}
public void setLink(String link) {this.link = link;}
}

问卷javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//问卷
public class Wj  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//问卷内容
private String wjTitle;
public String getWjTitle() {return wjTitle;}
public void setWjTitle(String wjTitle) {this.wjTitle = wjTitle;}
}

源代码下载点这里

评论