企业网站管理系统数据库设计

文章表

create table `cb_article`(
`id` MEDIUMINT(8) UNSIGNED  AUTO_INCREMENT,
`type` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
`title` VARCHAR(255) NOT NULL,
`content` TEXT,
`create_time` INT(10) UNSIGNED NOT NULL,
`hits` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(`id`)
)ENGINE=MyISAM DEFAULT CHARSET=utf8;



管理员表

CREATE TABLE `cb_admin` (
  `aid` tinyint(2) unsigned NOT NULL AUTO_INCREMENT,
  `admin_name` varchar(30) NOT NULL,
  `admin_password` char(32) NOT NULL,
  `login_time` int(11) NOT NULL,
  PRIMARY KEY (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



用户留言表

CREATE TABLE `cb_guestbook` (
  `gid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `nick_name` varchar(24) NOT NULL DEFAULT '',
  `email` varchar(32) NOT NULL DEFAULT '',
  `content` text NOT NULL,
  `create_time` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`gid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;



产品信息表

CREATE TABLE `cb_products`(
`id` MEDIUMINT(8) UNSIGNED AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`pic_path` VARCHAR(255),
`description` VARCHAR(255),
`create_time` INT(10) UNSIGNED NOT NULL,
PRIMARY KEY(`id`)
)ENGINE=MyISAM DEFAULT CHARSET=utf8;



文章类别表

CREATE TABLE `cb_type`(
`id` TINYINT(2) UNSIGNED AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`description` VARCHAR(255),
`sort_value` TINYINT(2) UNSIGNED NOT NULL DEFAULT 0,
PRIMARY KEY(`id`)
)ENGINE=MyISAM DEFAULT CHARSET=utf8;

你可能感兴趣的:(项目数据库设计)