数据库具体的sql查询文件内容如下:

create database petstore;

use petstore

create table Client (

username varchar(25) not null,

passwd varchar(25) not null,

constraint pk_Client primary key (username)

);

create table account (

userid varchar(25) not null,

email varchar(80) not null,

fullname varchar(80) not null,

country varchar(20) not null,

city varchar(80) not null,

address varchar(80) not null,

zip varchar(20) not null,

phone varchar(80) not null,

constraint pk_account primary key (userid),

constraint fk_account foreign key (userid)

references Client (username)

)

create table category (

catid char(10) not null,

catname varchar(80) null,

descn varchar(255) null,

constraint pk_category primary key (catid)

)

create table product (

productid char(10) not null,

catid char(10) not null,

name varchar(80) null,

descn varchar(255) null,

pic varchar(255) null,

listprice decimal(10,2) null,

unitcost decimal(10,2) null,

qty int not null,

constraint pk_product primary key (productid),

constraint fk_product_1 foreign key (catid)

references category (catid)

)

create table orders (

orderid int not null AUTO_INCREMENT,

userid varchar(25) not null,

orderdate date not null,

ordertime time not null,

shiptoname varchar(80) not null,

shipcountry varchar(20) not null,

shipcity varchar(80) not null,

shipaddress varchar(80) not null,

shipzip varchar(20) not null,

shipphone varchar(80) not null,

billtoname varchar(80) not null,

billcountry varchar(20) not null,

billcity varchar(80) not null,

billaddress varchar(80) not null,

billzip varchar(20) not null,

billphone varchar(80) not null,

totalprice numeric(10,2) not null,

creditcard varchar(80) not null,

cardtype varchar(80) not null,

constraint pk_orders primary key (orderid),

constraint fk_orders_1 foreign key (userid)

references account (userid)

)

create table lineitem (

orderid int not null,

itemid char(10) not null,

quantity int not null,

unitprice numeric(10,2) not null,

constraint pk_lineitem primary key (orderid,itemid),

constraint fk_lineitem_1 foreign key (orderid)

references orders (orderid),

constraint fk_lineitem_2 foreign key (itemid)

references product (productid)

)

业务逻辑:

1、   用户注册:输入用户名、密码、邮箱、全名、国家、城市、住址、邮编、电话                   注册成功后就可以进行按产品的分类浏览网站

2、   产品管理:为管理员所用,管理员可以增加产品分类,以及为每个分类增加产品,其中产品包括产品名,产品介绍,市场价格,当前价格,数量

3、   用户订购宠物:当用户看重某个宠物时,可以加入用户的购物车(用session实现)当用户购物车宠物选择完毕时,就可以进行预定,预定涉及到的表为orders,lineitem,product。其中orders表需要分别填写帐单寄往处、物品寄往处,以及预定日期、总价钱,银行卡号及类型。

pet store宠物商店数据库设计相关推荐

  1. 第十章 宠物商店 数据库建立插入信息

    # 创建宠物数据库 CREATE DATABASE db_pet;# 宠物主人表 CREATE TABLE MasterPet( `MasterID` INT COMMENT '宠物主人' PRIMA ...

  2. vs2015 dynamicweb11-1 .NET PET SHOP宠物商店完整项目代码

    此练习为一个完整的项目代码,含有用户注册.用户登录.宠物商品列表.购物车.结算.个人信息更新等功能. 在项目根目录,先创建App_Themes文件夹,其内建立一个文件夹PetShop1,内含一个css ...

  3. 【实验室集训大作业】JDBC实现宠物商店

    宠物商店 前言 这次的寒假大作业宠物商店,我是通过Java和MySQL实现的,具体的操作在下文会给出详细说明! 另外,由于Java和MySQL都是寒假刚学的,然后这个项目是边学边做的,所以有些方法在学 ...

  4. 《Kotlin从小白到大牛》第28章:项目实战1:开发PetStore宠物商店项目

    第28章 项目实战1:开发PetStore宠物商店项目 前面学习的Kotlin知识只有通过项目贯穿起来,才能将书本中知识变成自己的.通过项目实战读者能够了解软件开发流程,了解所学知识在实际项目中使用的 ...

  5. 【重学java之路】宠物商店实例

    问题描述:用一个宠物商店的实例描述出面向对象的关系 第一步:接口的设计-->宠物接口(标准) package com.wang.pet;public interface Pet {public ...

  6. java计算机毕业设计网上宠物商店系统源码+系统+数据库+lw文档+mybatis+运行部署

    java计算机毕业设计网上宠物商店系统源码+系统+数据库+lw文档+mybatis+运行部署 java计算机毕业设计网上宠物商店系统源码+系统+数据库+lw文档+mybatis+运行部署 本源码技术栈 ...

  7. 基于Springboot的宠物医院管理系统-JAVA【数据库设计、论文、源码、开题报告】

    1 绪论 1.1 课题背景 在信息技术高速发展的今天,新知识.新技术层出不穷,计算机技术早已广泛的应用于各行各业之中,利用计算机的强大数据处理能力和辅助决策能力叫,实现行业管理的规范化.标准化.效率化 ...

  8. 计算机毕业设计SSM宠物寄养平台设计【附源码数据库】

    项目运行 环境配置: Jdk1.8 + Tomcat7.0 + Mysql + HBuilderX(Webstorm也行)+ Eclispe(IntelliJ IDEA,Eclispe,MyEclis ...

  9. 【宠物商店管理系统】基于SSM的宠物商店系统(ppt+论文+源代码)

    技术架构 SSM +jsp+spring.javascript.servlet. 数据库:mysql 系统功能 ![在这里插入图片描述](https://img-blog.csdnimg.cn/b09 ...

最新文章

  1. 一口一个,超灵活的Python迷你项目
  2. (0093)iOS开发自己账号跑真机报错:conflicting provisioning
  3. 参考-这个符号在PHP中是什么意思?
  4. 正确停掉 expdp 或 impdp
  5. ZLMediaKit+wvp-GB28181-pro,搭建28181协议视频平台
  6. 抖音无水印解析网站源码
  7. vs2015编译vtk
  8. android netd firewall 分析,第2章 深入理解Netd
  9. dht11 新手原理详解(附代码)
  10. DevExpress VCL Subscription 版本:21.1.5
  11. 蓝桥杯基础练习python
  12. Android高性能日志模块-Xlog 正篇
  13. 树莓派 11 bullseye镜像官方源和国内源
  14. 三屏指挥调调度终端/三屏计算机/一机三屏指挥调度/三屏融合指挥调度
  15. POJ1502 信息传递(单源最短路径)
  16. 关于CND与真实IP
  17. 巡检机器人之仪表识别系统
  18. 解决时间机器无法识别硬盘问题
  19. AlexNet架构重现与解析
  20. Digital Ocean 如何使用GitHub学生优惠码

热门文章

  1. 低码框架 json-script-rule 配置说明
  2. 算数运算符、算术表达式
  3. google colab自动断连咋办?
  4. codeforce Gym 100685E Epic Fail of a Genie(MaximumProduction 贪心)
  5. 在处理时有错误发生: qmail qmail-run E: Sub-process /usr/bin/dpkg returned an error code (1)
  6. 人机工程学座椅设计_人机工程学椅子的尺寸和设计
  7. 腾讯云DevOps流水线的应用与实践
  8. cobbler 无人值守安装
  9. No.72-HackTheBox-windows-Fighter-Walkthrough渗透学习
  10. 饿了么的PWA升级实践