table.sql 668 Bytes
CREATE TABLE USER(
ID int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
EMAIL varchar(64) NOT NULL UNIQUE,
NICKNAME varchar(32) NOT NULL UNIQUE,
AGE int(16),
GENDER varchar(32)
);

CREATE TABLE REVIEW(
ID int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
CAFE_ID int(10) NOT NULL,
PRICE int(10) NOT NULL,
KINDNESS int(10) NOT NULL,
NOISE int(10) NOT NULL,
ACCESSIBILITY int(10) NOT NULL
);

CREATE TABLE PREFERENCE(
ID int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
NICKNAME varchar(32) NOT NULL  UNIQUE,
PRICE int(10) NOT NULL,
KINDNESS int(10) NOT NULL,
NOISE int(10) NOT NULL,
ACCESSIBILITY int(10) NOT NULL,
FOREIGN KEY(NICKNAME) REFERENCES USER(NICKNAME) ON DELETE CASCADE
);