栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

大数据作业怎么做(大数据作业答案)

大数据作业怎么做(大数据作业答案)

#primary key 关键约束,约束表唯一对应的记录。
#not null 非空约束,表的数值不能为空。
#default 默认约束,约束表的默认值。
#comment 非约束,可以添加注释。
create database a1;
use a1;
#在a1里面建立四个表
create table b1(aduID int(4) auto_increment primary key not null comment’管理员id’,aduName varchar(50) not null comment’管理员名称’,duPwd varbinary(128) not null comment’密码’,adLoginTime datetime(6) comment’最后登陆时间’);

create table b2(uID int(4) auto_increment primary key not null comment’会员id’,uName varchar(30) not null comment’用户名’ ,uPwd varchar(30) not null comment’密码’,uSex varchar(2) default’男’ comment’性别’,uBirth datetime(6) comment’出生日期’,uPhone varchar(20) comment’电话’,uEmail varchar(50) comment’邮箱’,uQQ varchar(20) comment’QQ号码’,ulmage varchar(100) comment’用户头像’,uCredit int(4) default’0’ comment’积分’,uRegiTime datetime(6) comment’注册时间’);

create table b3(tID int(4) auto_increment primary key not null comment’类别ID’,tName varchar(4) not null comment’类别名称’ );

create table b4(gdID int(4) auto_increment primary key not null comment’商品ID’,tID int(4) not null comment’类别ID’, gdCode varchar(50) not null comment’商品编号’,gdName varchar(100) not null comment’商品名字’,gdPrice float(8) default’0’ comment’商品价格’,gdQuanitity int(4) default’0’ comment’库存数量’,gdSaleQty int(4) default’0’ comment’已卖数量’,gdCity varchar(50) default’长沙’ comment’发货地’,gdlmage varchar(100) comment’商品图像’,gdInfo text(16) comment’商品描述’,gdAddTime datetime(6) comment’上线时间’,gdHot int(4) default’0’ comment’是否热销’);

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/772077.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号