建立公司网站的mysql数据库
create database aa
create table user (
userId int(10) unsigned not null AUTO_INCREMENT primary key,
userName varchar(40) not null ,
userPwd varchar(40) not null ,
userType varchar(10) not null)
create table news (
newsId int(10) unsigned not null AUTO_INCREMENT primary key,
newsTitle varchar(255) not null,
newsAuthor varchar(40) not null,
newsContent mediumtext not null,
newsUrl varchar(255) not null,
newsPicture mediumBlob ,
newsReadTimes int(10) unsigned ,
newsPublishTime date not null,
newsUpdateTime date not null,
newsKeyowrd varchar(50) not null,
newsType varchar(40) not null
)
create table products(
proId int(10) unsigned not null AUTO_INCREMENT primary key,
proTitle varchar(255) not null,
proName varchar(255) not null,
proPicture mediumBlob,
proAbstract mediumtext not null,
proType varchar(50) not null,
proPublishTime date not null
)//最终产品表和新闻表用的是一张表
create table message(
msgId int(10) unsigned not null AUTO_INCREMENT primary key,
msgTitle varchar(255) not null,
msgName varchar(40) not null,
msgContent mediumtext not null,
msgTime date not null,
msgEmail varchar(50) not null,
msgCheck varchar(20) not null)
数据库备份文件create table backup(
BId int(10) unsigned not null AUTO_INCREMENT primary key,
BName varchar(80) not null,
BDate varchar(40) not null,
BPath varchar(255) not null) |
|