-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathcreatedb.sql
More file actions
55 lines (50 loc) · 1.35 KB
/
createdb.sql
File metadata and controls
55 lines (50 loc) · 1.35 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
CREATE DATABASE IF NOT EXISTS webrtcdb;
USE webrtcdb;
CREATE TABLE IF NOT EXISTS peer (
peer_id INT auto_increment,
device VARCHAR(64) NOT NULL,
os VARCHAR(32) NOT NULL,
browser VARCHAR(32) NOT NULL,
network VARCHAR(32) NOT NULL,
PRIMARY KEY(peer_id)
);
CREATE TABLE IF NOT EXISTS experiment (
experiment_id INT auto_increment,
sender_id INT NOT NULL,
receiver_id INT NOT NULL,
stream_type VARCHAR(3) NOT NULL,
task_setup VARCHAR(2) NOT NULL,
PRIMARY KEY(experiment_id),
FOREIGN KEY(sender_id) REFERENCES peer(peer_id),
FOREIGN KEY(receiver_id) REFERENCES peer(peer_id)
);
CREATE TABLE IF NOT EXISTS sender_timings (
experiment_id INT NOT NULL,
exp_timestamp BIGINT NOT NULL,
init_peer_connection INT,
get_stream_from_device INT,
open_data_channel INT,
timing_type_3 INT,
timing_type_4 INT,
timing_type_5 INT,
timing_type_6 INT,
timing_type_7 INT,
timing_type_8 INT,
timing_type_9 INT,
FOREIGN KEY(experiment_id) REFERENCES experiment(experiment_id)
);
CREATE TABLE IF NOT EXISTS receiver_timings (
experiment_id INT NOT NULL,
exp_timestamp BIGINT NOT NULL,
init_peer_connection INT,
get_stream_from_device INT,
open_data_channel INT,
timing_type_3 INT,
timing_type_4 INT,
timing_type_5 INT,
timing_type_6 INT,
timing_type_7 INT,
timing_type_8 INT,
timing_type_9 INT,
FOREIGN KEY(experiment_id) REFERENCES experiment(experiment_id)
);