数据库

create database shop;
use shop;

create table admin(
aId tinyint(3) unsigned not null auto_increment,
aName varchar(20) not null,
aPw char(32) not null,
aEm varchar(50) not null,
primary key(aId),
unique key(aName)
)engine=InnoBD auto_increment=7 default charset=utf8;

create table cate(
cId smallint(5) unsigned not null auto_increment,
cName varchar(20) not null,
primary key(cId),
unique key(cName)
)engine=InnoBD auto_increment=5 default charset=utf8;

create table pro (
  pId int(10) unsigned not null auto_increment,
  pName varchar(255) not null,
  pSn varchar(50) not null,
  pNum int(10) unsigned default 1,
  mPrice decimal(10,2) not null,
  iPrice decimal(10,2) not null,
  pDesc text,
  pubTime int(10) unsigned not null,
  isShow tinyint(1) default 1,
  isHot tinyint(1) default 0,
  cId smallint(5) unsigned not null,
  primary key (id),
  unique key pName (pName),
  unique key pName_2 (pName)
) engine=InnoDB auto_increment=20 default charset=utf8;

create table user (
  uId int(10) unsigned not null auto_increment,
  username varchar(20) not null,
  password char(32) not null,
  sex enum('男','女','保密') not null default '保密',
  email varchar(50) not null,
  face varchar(50) not null,
  regTime int(10) unsigned not null,
  activeFlag tinyint(1) default 0,
  primary key (uId),
  unique key username (username)
) engine=InnoDB auto_increment=6 default charset=utf8;

create table album (
  alId int(10) unsigned not null auto_increment,
  pId int(10) unsigned not null,
  albumPath varchar(50) not null,
  primary key (alid)
) engine=InnoDB auto_increment=34 default charset=utf8;
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值