summaryrefslogtreecommitdiff
path: root/dbsetup.sql
diff options
context:
space:
mode:
authorDaniel Langesten <daniel.langest@gmail.com>2015-03-02 11:48:59 +0100
committerDaniel Langesten <daniel.langest@gmail.com>2015-03-02 11:48:59 +0100
commite044a4670963c95db54eb396d6455008d7c07ebd (patch)
treec93631e297e5bb5803b925744dd26077eb14e181 /dbsetup.sql
parent3a75f337ee4cb305c7ed8b56d45a3a64f6e4665e (diff)
renamed files
Diffstat (limited to 'dbsetup.sql')
-rw-r--r--dbsetup.sql28
1 files changed, 28 insertions, 0 deletions
diff --git a/dbsetup.sql b/dbsetup.sql
new file mode 100644
index 0000000..aad5b9a
--- /dev/null
+++ b/dbsetup.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, packet_size)
+);
+
+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,
+ packet_size INT
+);