summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Langesten <daniel.langest@gmail.com>2015-02-27 13:13:41 +0100
committerDaniel Langesten <daniel.langest@gmail.com>2015-02-27 13:13:41 +0100
commit084d3b346263754694cb4f874cd85b37e9a2b06c (patch)
tree3423f8b83b7cf73a26d594284fe5299aa731b756
parent9b919ede5ea1e02cc4b2815761cb17e3f897dcef (diff)
added setup for db
-rw-r--r--mysqltest.sql28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysqltest.sql b/mysqltest.sql
new file mode 100644
index 0000000..6d4d072
--- /dev/null
+++ b/mysqltest.sql
@@ -0,0 +1,28 @@
+DROP TABLE IF EXISTS asnip;
+
+CREATE TABLE asnip (
+ asn INT,
+ ip_block CHAR(18) -- Since a ip block consist of a maximum of 18 chars "255.255.255.255/32"
+);
+
+DROP TABLE IF EXISTS clean_data;
+
+CREATE TABLE clean_data (
+ ipb_src CHAR(18),
+ ipb_dst CHAR(18),
+ time DATETIME,
+ port INT,
+ volume CHAR(10),
+ occurences INT,
+ UNIQUE idx (ipb_src, ipb_dst, time, port, volume)
+);
+
+DROP TABLE IF EXISTS raw_data;
+
+CREATE TABLE raw_data (
+ ip_src CHAR(15), -- Since a ip consist of a maximum of 15 chars "255.255.255.255"
+ ip_dst CHAR(15),
+ time DATETIME,
+ port INT,
+ volume INT
+);