数据库设计说明书_第1页
数据库设计说明书_第2页
数据库设计说明书_第3页
数据库设计说明书_第4页
数据库设计说明书_第5页
已阅读5页,还剩17页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

数据库设计说明书 1 找实体,并写出实例列表:日志、相册、随笔、回复、用户、管理员、标签、话题、模板、留言板、广告、链接 2 找出每个实例的属性都有哪些?常用的公共属性(字段):主键id、添加时间、修改时间、添加者、修改者、状态、名称 3 找关系,并绘制E-R模型图。 4 数据字典见EXCEL 5 数据库建库、建表等sql脚本语句。DROP TABLE IF EXISTS sgl_ad;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_ad ( id int(10) unsigned NOT NULL auto_increment, pos int(10) unsigned default 0, content text NOT NULL, name varchar(60) NOT NULL default , PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_ad-LOCK TABLES sgl_ad WRITE;/*!40000 ALTER TABLE sgl_ad DISABLE KEYS */;/*!40000 ALTER TABLE sgl_ad ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_admin-DROP TABLE IF EXISTS sgl_admin;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_admin ( id int(11) unsigned NOT NULL auto_increment, name char(24) NOT NULL default , pass varchar(40) NOT NULL default , ctime int(10) NOT NULL default 0, PRIMARY KEY (id), UNIQUE KEY unique_name (name) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_admin-LOCK TABLES sgl_admin WRITE;/*!40000 ALTER TABLE sgl_admin DISABLE KEYS */;/*!40000 ALTER TABLE sgl_admin ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_album-DROP TABLE IF EXISTS sgl_album;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_album ( id int(10) unsigned NOT NULL auto_increment, uid int(10) unsigned NOT NULL default 0, status smallint(5) unsigned NOT NULL default 1, cid int(10) unsigned NOT NULL default 0, name varchar(60) NOT NULL default , description text NOT NULL, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_album-LOCK TABLES sgl_album WRITE;/*!40000 ALTER TABLE sgl_album DISABLE KEYS */;/*!40000 ALTER TABLE sgl_album ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_ar-DROP TABLE IF EXISTS sgl_ar;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_ar ( aid int(11) NOT NULL default 0, rid int(11) NOT NULL default 0) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_ar-LOCK TABLES sgl_ar WRITE;/*!40000 ALTER TABLE sgl_ar DISABLE KEYS */;/*!40000 ALTER TABLE sgl_ar ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_blog-DROP TABLE IF EXISTS sgl_blog;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_blog ( id int(11) unsigned NOT NULL auto_increment, uid int(11) unsigned NOT NULL default 0, cid int(11) unsigned NOT NULL default 0, title varchar(60) NOT NULL default , ctime int(11) NOT NULL default 0, click int(11) NOT NULL default 0, keywords varchar(60) NOT NULL default , status smallint(3) NOT NULL default 1, laudnum int(22) NOT NULL default 0, tbool smallint(2) NOT NULL default 1, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_blog-LOCK TABLES sgl_blog WRITE;/*!40000 ALTER TABLE sgl_blog DISABLE KEYS */;/*!40000 ALTER TABLE sgl_blog ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_blogcollect-DROP TABLE IF EXISTS sgl_blogcollect;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_blogcollect ( uid int(10) unsigned NOT NULL default 0, mid int(10) unsigned NOT NULL default 0, lid int(10) unsigned NOT NULL default 0, ctime int(10) unsigned NOT NULL default 0) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_blogcollect-LOCK TABLES sgl_blogcollect WRITE;/*!40000 ALTER TABLE sgl_blogcollect DISABLE KEYS */;/*!40000 ALTER TABLE sgl_blogcollect ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_blogcontent-DROP TABLE IF EXISTS sgl_blogcontent;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_blogcontent ( id int(11) unsigned NOT NULL auto_increment, content text, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_blogcontent-LOCK TABLES sgl_blogcontent WRITE;/*!40000 ALTER TABLE sgl_blogcontent DISABLE KEYS */;/*!40000 ALTER TABLE sgl_blogcontent ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_care-DROP TABLE IF EXISTS sgl_care;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_care ( uid1 int(11) NOT NULL default 0, uid2 int(11) NOT NULL default 0) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_care-LOCK TABLES sgl_care WRITE;/*!40000 ALTER TABLE sgl_care DISABLE KEYS */;/*!40000 ALTER TABLE sgl_care ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_classblog-DROP TABLE IF EXISTS sgl_classblog;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_classblog ( id int(10) unsigned NOT NULL auto_increment, utime int(10) unsigned NOT NULL default 0, cid int(10) unsigned NOT NULL default 0, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_classblog-LOCK TABLES sgl_classblog WRITE;/*!40000 ALTER TABLE sgl_classblog DISABLE KEYS */;/*!40000 ALTER TABLE sgl_classblog ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_diymod-DROP TABLE IF EXISTS sgl_diymod;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_diymod ( id int(10) unsigned NOT NULL auto_increment, uid int(10) unsigned NOT NULL default 0, css varchar(60) NOT NULL default , cname varchar(60) NOT NULL default , ctime int(10) unsigned NOT NULL default 0, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_diymod-LOCK TABLES sgl_diymod WRITE;/*!40000 ALTER TABLE sgl_diymod DISABLE KEYS */;/*!40000 ALTER TABLE sgl_diymod ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_link-DROP TABLE IF EXISTS sgl_link;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_link ( id int(10) unsigned NOT NULL auto_increment, link varchar(60) NOT NULL default , name varchar(60) NOT NULL default , logo varchar(60) NOT NULL default , PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_link-LOCK TABLES sgl_link WRITE;/*!40000 ALTER TABLE sgl_link DISABLE KEYS */;/*!40000 ALTER TABLE sgl_link ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_ltag-DROP TABLE IF EXISTS sgl_ltag;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_ltag ( mid int(10) unsigned NOT NULL default 0, lid int(10) unsigned NOT NULL default 0, tagid int(10) unsigned NOT NULL default 0) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_ltag-LOCK TABLES sgl_ltag WRITE;/*!40000 ALTER TABLE sgl_ltag DISABLE KEYS */;/*!40000 ALTER TABLE sgl_ltag ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_message-DROP TABLE IF EXISTS sgl_message;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_message ( id int(10) unsigned NOT NULL auto_increment, uid int(10) unsigned NOT NULL default 0, content text NOT NULL, ctime int(10) unsigned NOT NULL default 0, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_message-LOCK TABLES sgl_message WRITE;/*!40000 ALTER TABLE sgl_message DISABLE KEYS */;/*!40000 ALTER TABLE sgl_message ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_mod-DROP TABLE IF EXISTS sgl_mod;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_mod ( id int(11) unsigned NOT NULL auto_increment, name varchar(60) NOT NULL, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_mod-LOCK TABLES sgl_mod WRITE;/*!40000 ALTER TABLE sgl_mod DISABLE KEYS */;/*!40000 ALTER TABLE sgl_mod ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_mood-DROP TABLE IF EXISTS sgl_mood;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_mood ( id int(10) unsigned NOT NULL auto_increment, uid int(10) unsigned NOT NULL default 0, content text NOT NULL, ctime int(10) unsigned NOT NULL default 0, status smallint(6) NOT NULL default 0, laudnum int(10) unsigned NOT NULL default 0, tbool smallint(5) unsigned NOT NULL default 1, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_mood-LOCK TABLES sgl_mood WRITE;/*!40000 ALTER TABLE sgl_mood DISABLE KEYS */;/*!40000 ALTER TABLE sgl_mood ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_photo-DROP TABLE IF EXISTS sgl_photo;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_photo ( id int(10) unsigned NOT NULL auto_increment, status smallint(5) unsigned NOT NULL default 0, uid int(10) unsigned NOT NULL default 0, cid int(10) unsigned NOT NULL default 0, pic varchar(60) NOT NULL default , content text NOT NULL, ctime int(10) unsigned NOT NULL default 0, click int(10) unsigned NOT NULL default 0, tag varchar(60) NOT NULL default , laudnum int(10) unsigned NOT NULL default 0, tbool smallint(6) NOT NULL default 1, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_photo-LOCK TABLES sgl_photo WRITE;/*!40000 ALTER TABLE sgl_photo DISABLE KEYS */;/*!40000 ALTER TABLE sgl_photo ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_power-DROP TABLE IF EXISTS sgl_power;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_power ( id int(11) unsigned NOT NULL auto_increment, browse smallint(6) NOT NULL default 0, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_power-LOCK TABLES sgl_power WRITE;/*!40000 ALTER TABLE sgl_power DISABLE KEYS */;/*!40000 ALTER TABLE sgl_power ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_reply-DROP TABLE IF EXISTS sgl_reply;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_reply ( id int(10) unsigned NOT NULL auto_increment, uid int(10) unsigned NOT NULL default 0, cid int(10) unsigned NOT NULL default 0, rid int(10) unsigned NOT NULL default 0, content text NOT NULL, ctime int(10) unsigned NOT NULL default 0, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_reply-LOCK TABLES sgl_reply WRITE;/*!40000 ALTER TABLE sgl_reply DISABLE KEYS */;/*!40000 ALTER TABLE sgl_reply ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_role-DROP TABLE IF EXISTS sgl_role;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_role ( id int(11) unsigned NOT NULL auto_increment, name char(24) NOT NULL default , PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_role-LOCK TABLES sgl_role WRITE;/*!40000 ALTER TABLE sgl_role DISABLE KEYS */;/*!40000 ALTER TABLE sgl_role ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_rp-DROP TABLE IF EXISTS sgl_rp;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_rp ( rid int(11) NOT NULL default 0, pid int(11) NOT NULL default 0) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_rp-LOCK TABLES sgl_rp WRITE;/*!40000 ALTER TABLE sgl_rp DISABLE KEYS */;/*!40000 ALTER TABLE sgl_rp ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_tag-DROP TABLE IF EXISTS sgl_tag;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_tag ( id int(10) unsigned NOT NULL auto_increment, cid int(10) unsigned NOT NULL default 0, name varchar(60) NOT NULL default , PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_tag-LOCK TABLES sgl_tag WRITE;/*!40000 ALTER TABLE sgl_tag DISABLE KEYS */;/*!40000 ALTER TABLE sgl_tag ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_topic-DROP TABLE IF EXISTS sgl_topic;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_topic ( id int(10) unsigned NOT NULL auto_increment, uid int(10) unsigned NOT NULL default 0, name varchar(60) NOT NULL default , tid int(10) unsigned NOT NULL default 0, ctime int(10) unsigned NOT NULL default 0, description text NOT NULL, PRIMARY KEY (id) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_topic-LOCK TABLES sgl_topic WRITE;/*!40000 ALTER TABLE sgl_topic DISABLE KEYS */;/*!40000 ALTER TABLE sgl_topic ENABLE KEYS */;UNLOCK TABLES;- Table structure for table sgl_topicuser-DROP TABLE IF EXISTS sgl_topicuser;SET saved_cs_client = character_set_client;SET character_set_client = utf8;CREATE TABLE sgl_topicuser ( tid int(10) unsigned NOT NULL default 0, uid int(10) unsigned NOT NULL default 0) ENGINE=MyISAM DEFAULT CHARSET=utf8;SET character_set_client = saved_cs_client;- Dumping data for table sgl_topicuser-LOCK TABLES sgl_topicuser WRITE;/*!40000 ALTER TABLE sgl_topicuser DISABLE KEYS */;/*!40000 ALTER TABLE sgl_topicuser ENABLE KEYS */;UNLOCK TABLES;- Table s

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论