CREATE DATABASE soju;
USE soju;
CREATE TABLE Member(
emailId VARCHAR(50) PRIMARY KEY,
pwd VARCHAR(255) NOT NULL,
name VARCHAR(10) NOT NULL,
nickName VARCHAR(20) NOT NULL,
birthDay DATE NOT NULL,
gender VARCHAR(1) NOT NULL,
phoneNumber VARCHAR(15) NOT NULL,
address VARCHAR(100) NOT NULL,
roleName VARCHAR(100) NOT NULL
);
CREATE TABLE Pay(
uod VARCHAR(200) PRIMARY KEY,
PGName VARCHAR(50) NOT NULL,
payMethod VARCAHR(100) NOT NULL,
itemNmae VARCHAR(50) NOT NULL,
price INT NOT NULL,
buyerEmail VARCHAR(50) NOT NULL,
buyerName VARCHAR(10) NOT NULL,
buyerTel VARCAHR(15) NOT NULL,
buyerAddress VARCHAR(100) NOT NULL,
buyerPostNumber VARCHAR(50)
);
CREATE TABLE Store(
storeIdx INT PRIMARY KEY,
goods VARCHAR(50),
category VARCHAR(50),
price INT NOT NULL,
introduce VARCAHR(500),
stock INT NOT NULL,
goodsLike INT,
itemName VARCHAR(50) NOT NULL
);
CREATE TABLE Pay(
impUid VARCHAR(200) PRIMARY KEY,
merchantUid VARCHAR(200),
PGname VARCHAR(50),
payMethod VARCHAR(300),
itemName VARCHAR(50),
price INT,
buyerEmail VARCHAR(50),
buyerName VARCHAR(20),
buyerTel VARCHAR(20),
buyerAddress VARCHAR(50),
buyerPostNum VARCHAR(50)
);