forked from HugLife/HugLife
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathschema.sql
32 lines (25 loc) · 780 Bytes
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
DROP DATABASE IF EXISTS drinkedin;
CREATE DATABASE drinkedin;
USE drinkedin;
CREATE TABLE bars (
id int NOT NULL UNIQUE,
name varchar(50) NOT NULL,
address varchar(200) NOT NULL,
PRIMARY KEY (ID)
);
CREATE TABLE bartenders (
id int NOT NULL AUTO_INCREMENT UNIQUE,
name varchar(200) NOT NULL,
bar_id int NOT NULL,
expert_right int,
expert_left int,
friendly_right int,
friendly_left int,
quick_right int,
quick_left int,
PRIMARY KEY (ID)
);
INSERT INTO bartenders (name, bar_id, expert_right, expert_left, friendly_right, friendly_left, quick_right, quick_left) VALUES ('Datum Bass', 2, 10, 5, 8, 4, 9, 1),
('Esteban Quito', 1, 15, 3, 2, 17, 2, 7),
('Sum Rand Om Gai', 3, 1, 15, 8, 24, 9, 31),
('John Doe', 2, 101, 50, 80, 40, 90, 10);