--数据库名:gome 账号:gome 密码:gome create user gome identified by gome; grant dba to gome; --drop user gome cascade --用户表(gome_user) create table gome_user( gu_user_id varchar2(20) not null primary key, --用户名 主键 gu_user_name varchar(20), --用户真实姓名 gu_password varchar(20) not null, --密码 gu_identity_code varchar2(60), --身份证号 gu_email varchar2(80) not null, --email gu_mobile varchar2(11), --手机号码 gu_tel varchar2(8), --固定电话 gu_address varchar2(400), --收货地址 gu_style_id number(6,0) not null, --用户类型表编号 gu_cancel char(1) not null,--0在用,1注销 foreign key(gu_style_id) references user_style(gu_style_id)--用户类型表主外键 ) --评论表(gome_comment) create table gome_comment( gc_comment_id number(10,0) not null primary key,--评论编号 gp_goods_id number(10,0) not null,--商品编号 gc_content varchar2(200) not null,--发表的留言内容 gc_create_time date not null,--创建时间 gc_approval number(10,0) not null,--赞同的人数 gu_user_id varchar2(20) not null,--用户名 gc_cancel char(1) not null,--审核(0通过,1不通过) foreign key(gp_goods_id) references gome_product(gp_goods_id),--商品表主外键 foreign key(gu_user_id) references gome_user(gu_user_id)--用户表主外键 ) --回复表(gome_reply) create table gome_reply( gr_reply_id number(10,0) not null primary key,--回复编号 gc_comment_id number(10,0) not null,--评论编号 gr_reply varchar2(200) not null,--针对留言的回复 gr_reply_time date not null,--回复时间 gr_approval number(10,0) not null,--赞同的人数 gu_user_id varchar2(20) not null,--用户名 foreign key(gc_comment_id) references gome_comment(gc_comment_id),--评论表主外键 foreign key(gu_user_id) references gome_user(gu_user_id)--用户表主外键 ) --商品表(gome_product) create table gome_product( gp_goods_id number(10,0) not null primary key,--商品编号 gp_name varchar2(30) not null,--商品名称 gp_description varchar2(300) not null,--商品描述 gp_present varchar2(300) not null,--商品介绍 gp_stock number(10,0) not null,--商品库存 gp_price number(10,2) not null,--商品价钱 gcr_class_id number(10,0) not null,--分类的编号 gcc_child_id number(10,0) not null,--类别的二级的编号 gp_file_name130w varchar2(100) not null,--上传文件名130w gp_file_name160w varchar2(100) not null,--上传文件名160w gp_upload_time date not null,--上传时间 gp_judge char(1) not null,--原价/降价(0/1) gp_cancel char(1) not null,--0在线商品,1下架商品 foreign key(gcr_class_id) references gome_class_relation(gcr_class_id),--商品分类关系表主外键 foreign key(gcc_child_id) references gome_child_category(gcc_child_id)--商品部类关系表主外键 ) --商品搜索页面分类关系表(gome_class_relation) create table gome_class_relation( gcr_class_id number(10,0) not null primary key,--分类的编号 gbc_brand_id number(10,0) not null,--品牌的编号 gcc_category_id number(10,0) not null,--产品类别的编号 goc_other_id number(10,0) not null,--其他的编号 foreign key(gbc_brand_id) references gome_brand_class(gbc_brand_id),--商品品牌分类表主外键 foreign key(gcc_category_id) references gome_category_class(gcc_category_id),--商品产品类别表主外键 foreign key(goc_other_id) references gome_other_class(goc_other_id)--商品其他分类表主外键 ) --商品搜索页面父分类(gome_parent_class) create table gome_parent_class( gpc_parent_id number(10,0) not null primary key,--父分类id gpc_parent_name varchar2(50) not null--父分类内容 ) --商品搜索页面品牌分类(gome_brand_class) create table gome_brand_class( gbc_brand_id number(10,0) not null primary key,--品牌的编号 gbc_brand_name varchar2(50) not null,--品牌分类内容 gpc_parent_id number(10,0) not null,--所属父分类id foreign key(gpc_parent_id) references gome_parent_class(gpc_parent_id)--商品父分类表主外键 ) --商品搜索页面产品类别(gome_category_class) create table gome_category_class( gcc_category_id number(10,0) not null primary key,--产品类别的编号 gcc_category_name varchar2(50) not null,--产品类别的内容 gpc_parent_id number(10,0) not null,--所属父分类id foreign key(gpc_parent_id) references gome_parent_class(gpc_parent_id)--商品父分类表主外键 ) --商品搜索页面其他分类(gome_other_class) create table gome_other_class( goc_other_id number(10,0) not null primary key,--其他分类的编号 goc_other_name varchar2(50) not null,--其他分类的内容 gpc_parent_id number(10,0) not null,--所属父分类id foreign key(gpc_parent_id) references gome_parent_class(gpc_parent_id)--商品父分类表主外键 ) --商品一级分类表(gome_parent_category) create table gome_parent_category( gpc_parent_id number(10,0) not null primary key,--所属一级分类id gpc_parent_name varchar2(20) not null--所属一级分类名称 ) --商品二级分类表(gome_child_category) create table gome_child_category( gcc_child_id number(10,0) not null primary key,--所属二级分类id gcc_child_name varchar2(50) not null,--所属二级分类名称 gpc_parent_id number(10,0) not null,--所属一级分类id foreign key(gpc_parent_id) references gome_parent_category(gpc_parent_id)--商品一级分类表主外键 ) --商品内容表(gome_product_detail) create table gome_product_detail( gpd_id number(10,0) not null primary key,--编号 gp_goods_id number(10,0) not null,--商品编号 gpd_file_name750w varchar2(100) not null,--上传文件名750w foreign key(gp_goods_id) references gome_product(gp_goods_id)--商品表主外键 ) --订单主表(gome_order_h) create table gome_order_h( goh_id number(10,0) not null primary key,--订单号 gu_user_id varchar2(20) not null,--用户名 goh_create_time date not null,--创建时间 goh_totalprice number(10,2) not null,--总金额 goh_status_id number(6,0) not null,--状态编号 goh_payment_style_id number(6,0) not null,--付款方式编号 goh_cancel char(1) not null,--0为有用订单,1为撤消订单 foreign key(gu_user_id) references gome_user(gu_user_id)--用户表主外键 ) --订单子表(gome_order_b) create table gome_order_b( gob_id number(10,0) not null primary key,--编号 goh_id number(10,0) not null,--订单号 gp_goods_id number(10,0) not null,--商品编号 gob_count number(10,0) not null,--数量 gob_price number(10,2) not null,--单价 foreign key(gp_goods_id) references gome_product(gp_goods_id),--商品表主外键 foreign key(goh_id) references gome_order_h(goh_id)--订单主表主外键 ) --大图与小图表(gome_images) create table gome_images( gi_id number(10,0) not null primary key,--编号 gp_goods_id number(10,0) not null,--商品编号 gi_file_smallimg varchar2(100) not null,--上传小图50w gi_file_bigimg varchar2(100) not null,--上传大图800w foreign key(gp_goods_id) references gome_product(gp_goods_id)--商品表主外键 ) --用户类型表(user_style) create table user_style( gu_style_id number(6,0) not null primary key,--用户类型编号 gu_style_name varchar2(50) not null--用户类型名称 ) --订单状态表(order_status) create table order_status( go_status_id number(6,0) not null primary key,--订单状态编号 go_status__name varchar2(20) not null --订单状态名称 ) --付款方式表(order_payment_style) create table order_payment_style( go_payment_style_id number(6,0) not null primary key,--付款方式编号 go_payment_style_name varchar2(10) not null --付款方式名称 ) /*create sequence name_seq -- 尽量使用统一前缀命名,方便管理 建议使用table名+_seq 例如:gome_user_seq increment by 1 -- 自增步长 这里设置为1 start with 1 -- 计数起点 这里设置为1 nomaxvalue -- 不设置最大值 可选项 maxvalue|minvalue nocycle -- 一直累加,不循环 cache 10; */ /*如果追求效率 可设置缓存 如果在Oracle宕机或者断电等非正常中断服务的 情况 可能会造成序列不连继续的情况出现,如果不使用缓存,则这里写NOCHACHE */ /*序列号命名模式*/ --评论表(gome_comment) create sequence gome_comment_seq --回复表(gome_reply) create sequence gome_reply_seq --商品表(gome_product) create sequence gome_product_seq --商品内容表(gome_product_detail) create sequence gome_product_detail_seq --订单主表(gome_order_h) create sequence gome_order_h_seq --订单子表(gome_order_b) create sequence gome_order_b_seq --大图与小图表(gome_images) create sequence gome_images_seq --用户类型表(user_style) create sequence user_style_seq --订单状态表(order_status) create sequence order_status_seq --付款方式表(order_payment_style) create sequence order_payment_style_seq /*查询表*/ --用户表(gome_user) select * from gome_user --评论表(gome_comment) select * from gome_comment insert into gome_comment (gc_comment_id, gp_goods_id, gc_content, gc_create_time, gc_approval, gu_user_id, gc_cancel) values (222, 9, '我给妈妈订的 机器拿到手 盒子就比较旧 拆开后 发现机器上全是指纹,', sysdate, 19,'abigail', '0'); --回复表(gome_reply) select * from gome_reply --商品表(gome_product) select * from gome_product g ,gome_images gi where g.gp_goods_id=gi.gp_goods_id --商品搜索页面分类关系表(gome_class_relation) select * from gome_class_relation for update --商品搜索页面父分类(gome_parent_class) select * from gome_parent_class --商品搜索页面品牌分类(gome_brand_class) select * from gome_brand_class --商品搜索页面产品类别(gome_category_class) select * from gome_category_class --商品搜索页面其他分类(gome_other_class) select * from gome_other_class --商品一级分类表(gome_parent_category) select * from gome_parent_category --商品二级分类表(gome_child_category) select * from gome_child_category --商品内容表(gome_product_detail) select * from gome_product_detail --订单主表(gome_order_h) select * from gome_order_h --订单子表(gome_order_b) select * from gome_order_b --大图与小图表(gome_images) select count(*) from gome_images where gp_goods_id=320 for update --用户类型表(user_style) select * from user_style --订单状态表(order_status) select * from order_status --付款方式表(order_payment_style) select * from order_payment_style --导出 exp gome/gome@localhost/oracle10 file=D:\mydate\gome.dmp tables=(gome_user,gome_comment,gome_reply,gome_product,gome_class_relation,gome_parent_class,gome_brand_class,gome_category_class,gome_other_class,gome_parent_category,gome_child_category,gome_product_detail,gome_order_h,gome_order_b,gome_images,user_style,order_status,order_payment_style) --导入 imp gome/gome@localhost/oracle10 file=D:\mydate\gome.dmp full=y
相关推荐
com.gome.eshopnew 最新版本: 4.0.6 支持ROM: 2.2及更高版本 界面语言: 简体中文 软件大小: 13.17 M 更新日期: 4天前 开发者: 国美在线电子商务有限公司 美在线移动客户端是一款基于IOS和Android平台的网络...
中国公司治理案例分析--国美.pptx
国美.pptx
国美.rp
10专题篇2公司治理与内部控制-案例-国美.pptx
用TC写的游戏,很有意思,有兴趣的可以尝试一下
已实现: 1.商城(商品分类,购物车,商品详情评论,筛选,属性回调,布局切换) 2.美媒榜(界面布局,父子控制器) 3.美店(界面布局) 4.我的(用户登录 账号:CDDMall 密码:000 ...更多功能,请下载查看~
仿国美首页代码js,css,html 仿国美首页代码js,css,html仿国美首页代码js,css,html 仿国美首页代码js,css,html仿国美首页代码js,css,html 仿国美首页代码js,css,html 仿国美首页代码js,css,html
供应链合作伙伴的选择--国美案例.pptx
基于ssm模仿国美商城,idea开发,maven,java
组织分析报告-国美电器.zip
国美在线店铺开店考试试题,在国美开店营业前需要通过平台的考试,资源中有三次考试的题目以及平台给出的答案,以供需要者考试参考。
国美电器选址要求.doc
中国公司治理案例分析--国美1.pptx
国美手机u7 安卓原生线刷包 版本是7.1 包含谷歌全套件 已在我的手机上刷过测试
[精选]门店经理财务知识(国美).pptx
国美小虫是国美官方为旗下员工打造的智能办公的系统软件,国美小虫可以与手机配合使用,加强国美员工内部的沟通交流,国美小虫使用十分的方便!本站提供最新版国美小虫下载。 国美小虫使用方法 请确保您已经使用...
关于国美电器财务分析.pptx
国美电器印信管理办法.doc
国美电器盈利模式分析.doc