-
Notifications
You must be signed in to change notification settings - Fork 0
/
DB_SETUP.txt
40 lines (37 loc) · 1.06 KB
/
DB_SETUP.txt
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
CREATE DATABASE ADV;
USE ADV;
CREATE TABLE NODES (
id INT(128) NOT NULL AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(80) NOT NULL,
type VARCHAR(80) NOT NULL,
child_amount INT(128),
active INT(128),
parent_name VARCHAR(200),
color VARCHAR(200),
admin_count VARCHAR(8),
account_name VARCHAR(100),
main_mail VARCHAR(100),
all_mail VARCHAR(800),
mobile VARCHAR(100),
telephone_nr VARCHAR(100),
department VARCHAR(100),
manager VARCHAR(100),
country VARCHAR(100),
country_code VARCHAR(100),
postal_code VARCHAR(8),
last_logoff VARCHAR(100),
last_logon VARCHAR(100),
logon_count VARCHAR(8),
bad_password_time VARCHAR(100),
last_change VARCHAR(100),
created VARCHAR(100)
);
CREATE TABLE EDGES (
id INT(128) NOT NULL AUTO_INCREMENT PRIMARY KEY,
child_amount INT(128),
source INT(128) NOT NULL,
target INT(128) NOT NULL,
display_type VARCHAR(8),
FOREIGN KEY (source) REFERENCES NODES(id),
FOREIGN KEY (target) REFERENCES NODES(id)
);