分享
分销 收藏 举报 申诉 / 4

类型MySQL论坛数据库建表实例(张伟).doc

  • 上传人:仙人****88
  • 文档编号:8989918
  • 上传时间:2025-03-10
  • 格式:DOC
  • 页数:4
  • 大小:59KB
  • 下载积分:10 金币
  • 配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    MySQL 论坛 数据库 实例
    资源描述:
    CREATE TABLE BBSAccount( AccountID bigint auto_increment primary key, NickName varchar(30) NOT NULL, Birthday datetime, Password varchar(20), State char(2), SEmail varchar(50)); CREATE TABLE BBSSector( SectorID int auto_increment primary key, AccountID bigint not null, SectorName varchar(20) not null, ClickingRate int default ‘0’, TopicCount bigint default ‘0’, FOREIGN KEY(AccountID )REFERENCES BBSAccount(AccountID) ON UPDATE CASCADE ON DELETE RESTRICT); CREATE TABLE BBSTopic( TopicID bigint auto_increment primary key, AccountID bigint not null, Title varchar(50) not null, TopicText text not null, TopicDate timestamp null default current_timestamp, ReplyCount int not null, ClickingRate int default ‘0’, SectorID int not null, FOREIGN KEY(AccountID) REFERENCES BBSAccount(AccountID) ON UPDATE CASCADE ON DELETE RESTRICT, FOREIGN KEY(SectorID) REFERENCES BBSSector(SectorID) ON UPDATE CASCADE ON DELETE RESTRICT); CREATE TABLE BBSReply( ReplyID bigint auto_increment primary key, TopicID bigint not null, AccountID bigint not null, ReplyText varchar(2000) not null, ReplyDate timestamp null default current_timestamp, ClickingRate int default ‘0’, Foreign key(TopicID) references BBSTopic (TopicID) ON UPDATE CASCADE ON DELETE RESTRICT, FOREIGN KEY(AccountID) REFERENCES BBSAccount(AccountID) ON UPDATE CASCADE ON DELETE RESTRICT); package model; public class BBSAccount implements java.io.Serializable { private Integer AccountID; private String NickName; private String Birthday;//timestamp对应的是什么类型? private String Password; private String State; private String SEmail; public BBSAccount(){} public BBSAccount(Integer AccountID, String NickName, String Birthday, String Password, String State ,String SEmail){ this. AccountID = AccountID; this.NickName= NickName; this. Birthday= Birthday; this. Password= Password; this. State= State; this. SEmail= SEmail;} public String getAccountID (Integer AccountID){ return AccountID;} public void setAccountID(Integer AccountID){ this. AccountID = AccountID;} public String getNickName(String NickName){ return NickName;} public void setNickName(String NickName){ this.NickName= NickName;} public String getBirthday(String Birthday){ return Birthday;} public void setPassword(String Password){ this. Password= Password;} public String getState(String State){ return State;} public void setState(String State){ this. State= State;} public String getSEmail(String SEmail){ return SEmail;} public void setSEmail(String SEmail){ this. SEmail= SEmail;} public String getPassword(String Password){ return Password;} public void setBirthday(String Birthday){ this. Birthday= Birthday;}
    展开阅读全文

    开通VIP折扣优惠下载文档

    提示  咨信网声明:本文档由用户上传并分享,仅供学习交流、研究之用,未经授权,严禁复制、发行、汇编、翻译或网络传播等,侵权必究。

    咨信网小贴示:
    1、浏览或下载可查看了解,请点击【咨信网告知】。
    2、下载文件中如有侵权或不适当内容,将立即纠正。
    3、如果因为网速或其他原因下载失败请重新下载,重复下载[60天内]不扣币。
    4、开具发票登录电脑端申请,请点击【索取发票】。

    咨信网客服组:【微信客服】

    自信AI创作助手
    关于本文
    本文标题:MySQL论坛数据库建表实例(张伟).doc
    链接地址:https://www.zixin.com.cn/doc/8989918.html

    Copyright ©2010-2026   All Rights Reserved  宁波自信网络信息技术有限公司 版权所有   |  客服电话:0574-28810668    微信客服:咨信网客服    投诉电话:18658249818   

    违法和不良信息举报邮箱:help@zixin.com.cn    文档合作和网站合作邮箱:fuwu@zixin.com.cn    意见反馈和侵权处理邮箱:1219186828@qq.com   | 证照中心

    12321jubao.png12321网络举报中心 电话:010-12321  jubao.png中国互联网举报中心 电话:12377   gongan.png浙公网安备33021202000488号  icp.png浙ICP备2021020529号-1 浙B2-20240490   


    关注我们 :微信公众号  抖音  微博  LOFTER               

    自信网络  |  ZixinNetwork