文件名称:
bbs论坛项目运用SSH框架Oracle数据库编写的一个简单示列项目
开发工具:
文件大小: 1mb
下载次数: 0
上传时间: 2010-12-06
详细说明: 数据库创建代码: 1:用户表:(users) userid(主键),username(用户名),password(密码),sex(性别),head(头像),regdate(注册日期) 2:类别表:(types) tid(主键),type 3:技术表:(technic) teid(主键),tename(技术名),tsum(拥有帖子数量),tid(引用类别表主键) 4:帖子表:(card) cid(主键),title(标题),content(内容),outtime(发帖时间),uptime(修改帖子的时间),csum(回帖数量),tename(属于哪个技术), userid(引用用户表外键) 5:回帖表:(restore) rid(主键),rtitle(标题),rcontent(内容),routtime(发帖时间),ruptime(修改帖子的时间),tename(属于哪个技术), userid(引用用户表外键),cid(引用帖子表主键) --用户表:(users) -- Create table create table USERS ( USERID INTEGER not null, USERNAME VARCHAR2(20) not null, PASSWORD VARCHAR2(20) not null, SEX VARCHAR2(20) not null, HEAD VARCHAR2(20) not null, REGDATE DATE not null ) tablespace SYSTEM pctfree 10 pctused 40 initrans 1 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); -- Create/Recreate primary, unique and foreign key constraints alter table USERS add constraint PK_USERID primary key (USERID) using index tablespace SYSTEM pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); --类别表:(types) -- Create table create table TYPES ( TID INTEGER not null, TYPE VARCHAR2(20) not null ) tablespace SYSTEM pctfree 10 pctused 40 initrans 1 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); -- Create/Recreate primary, unique and foreign key constraints alter table TYPES add constraint PK_TID primary key (TID) using index tablespace SYSTEM pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); --技术表:(technic) -- Create table create table TECHNIC ( TEID INTEGER not null, TENAME VARCHAR2(20) not null, TSUM INTEGER not null, TID INTEGER not null ) tablespace SYSTEM pctfree 10 pctused 40 initrans 1 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); -- Create/Recreate primary, unique and foreign key constraints alter table TECHNIC add constraint PK_TEID primary key (TEID) using index tablespace SYSTEM pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); alter table TECHNIC add constraint FK_TID foreign key (TID) references TYPES (TID); --帖子表:(card) -- Create table create table CARD ( CID INTEGER not null, TITLE VARCHAR2(20) not null, CONTENT VARCHAR2(100) not null, OUTTIME DATE not null, UPTIME DATE not null, CSUM INTEGER not null, TENAME VARCHAR2(20) not null, USERID INTEGER ) tablespace SYSTEM pctfree 10 pctused 40 initrans 1 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); -- Create/Recreate primary, unique and foreign key constraints alter table CARD add constraint PK_CID primary key (CID) using index tablespace SYSTEM pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); alter table CARD add constraint FK_USERID foreign key (USERID) references USERS (USERID); --回帖表:(restore) -- Create table create table RESTORE ( RID INTEGER not null, RTITLE VARCHAR2(20) not null, RCONTENT VARCHAR2(100) not null, ROUTTIME DATE not null, RUPTIME DATE not null, TENAME VARCHAR2(20) not null, USERID INTEGER not null, CID INTEGER not null ) tablespace SYSTEM pctfree 10 pctused 40 initrans 1 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); -- Create/Recreate primary, unique and foreign key constraints alter table RESTORE add constraint PK_RID primary key (RID) using index tablespace SYSTEM pctfree 10 initrans 2 maxtrans 255 storage ( initial 64K minextents 1 maxextents unlimited ); alter table RESTORE add constraint FK_CID foreign key (CID) references CARD (CID); alter table RESTORE add constraint FK_UID foreign key (USERID) references USERS (USERID); --序列号 -- Create sequence create sequence SEQ_CID minvalue 1 maxvalue 9999999999 start with 1 increment by 1 cache 20 order; --seq_userid -- Create sequence create sequence SEQ_USERID minvalue 1 maxvalue 9999991 start with 1 increment by 1 cache 20 order; --seq_tid -- Create sequence create sequence SEQ_TID minvalue 1 maxvalue 99999 start with 1 increment by 1 cache 20 order; --seq_teid -- Create sequence create sequence SEQ_TEID minvalue 1 maxvalue 999999 start with 1 increment by 1 cache 20 order; --seq_rid -- Create sequence create sequence SEQ_RID minvalue 1 maxvalue 99999 start with 1 increment by 1 cache 20 order; ...展开收缩
(系统自动生成,下载前可以参看下载内容)
下载文件列表
相关说明
- 本站资源为会员上传分享交流与学习,如有侵犯您的权益,请联系我们删除.
- 本站是交换下载平台,提供交流渠道,下载内容来自于网络,除下载问题外,其它问题请自行百度。
- 本站已设置防盗链,请勿用迅雷、QQ旋风等多线程下载软件下载资源,下载后用WinRAR最新版进行解压.
- 如果您发现内容无法下载,请稍后再次尝试;或者到消费记录里找到下载记录反馈给我们.
- 下载后发现下载的内容跟说明不相乎,请到消费记录里找到下载记录反馈给我们,经确认后退回积分.
- 如下载前有疑问,可以通过点击"提供者"的名字,查看对方的联系方式,联系对方咨询.