김대철

Merge branch 'database'

1 +CREATE TABLE USER(
2 +ID int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
3 +EMAIL varchar(64) NOT NULL UNIQUE,
4 +NICKNAME varchar(32) NOT NULL UNIQUE,
5 +AGE int(16),
6 +GENDER varchar(32)
7 +);
8 +
9 +CREATE TABLE REVIEW(
10 +ID int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
11 +CAFE_ID int(10) NOT NULL,
12 +PRICE int(10) NOT NULL,
13 +KINDNESS int(10) NOT NULL,
14 +NOISE int(10) NOT NULL,
15 +ACCESSIBILITY int(10) NOT NULL
16 +);
17 +
18 +CREATE TABLE PREFERENCE(
19 +ID int(10) NOT NULL AUTO_INCREMENT PRIMARY KEY,
20 +NICKNAME varchar(32) NOT NULL UNIQUE,
21 +PRICE int(10) NOT NULL,
22 +KINDNESS int(10) NOT NULL,
23 +NOISE int(10) NOT NULL,
24 +ACCESSIBILITY int(10) NOT NULL,
25 +FOREIGN KEY(NICKNAME) REFERENCES USER(NICKNAME) ON DELETE CASCADE
26 +);
...\ No newline at end of file ...\ No newline at end of file