Git Product home page Git Product logo

resellbookshop's Introduction

ResellBookShop

以下为数据库的代码,在命令行中输入创建数据库


/* SQLyog 企业版 - MySQL GUI v8.14 MySQL - 5.7.16 : Database - resell_bookstore ********************************************************************* */

/*!40101 SET NAMES utf8 */;

/!40101 SET SQL_MODE=''/;

/!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 /; /!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 /; /!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' /; /!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 /; CREATE DATABASE /!32312 IF NOT EXISTS/resell_bookstore /*!40100 DEFAULT CHARACTER SET utf8 */;

USE resell_bookstore;

/*Table structure for table book */

DROP TABLE IF EXISTS book;

CREATE TABLE book ( id int(11) NOT NULL AUTO_INCREMENT, bookName varchar(20) DEFAULT NULL, bookType varchar(20) DEFAULT NULL, publish varchar(20) DEFAULT NULL, price double DEFAULT NULL, sellId int(11) DEFAULT NULL, buyId int(11) DEFAULT NULL, PRIMARY KEY (id), KEY FK_sell (sellId), KEY FK_buy (buyId), CONSTRAINT FK_buy FOREIGN KEY (buyId) REFERENCES user (id), CONSTRAINT FK_sell FOREIGN KEY (sellId) REFERENCES user (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table book */

/*Table structure for table user */

DROP TABLE IF EXISTS user;

CREATE TABLE user ( id int(11) NOT NULL AUTO_INCREMENT, userName varchar(20) DEFAULT NULL, password varchar(20) DEFAULT NULL, tel int(11) DEFAULT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

/*Data for the table user */

/*!40101 SET SQL_MODE=@OLD_SQL_MODE /; /!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS /; /!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS /; /!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

resellbookshop's People

Contributors

zhangbaoning avatar

Watchers

James Cloos avatar  avatar

Forkers

awkwordmao

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.