MetriVis | Overview | Download | User Manual | Development |
Tutorial | Overview | Creating a Database | |
CREATE TABLE label ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, attributes TEXT );
Where attributes are not used at the moment.
CREATE TABLE data ( time_slice FLOAT PRIMARY KEY, m1 FLOAT, m2 FLOAT, m3 FLOAT, m4 FLOAT, m5 FLOAT, m6 FLOAT, ... ... );
CREATE TABLE time_line_label ( id INTEGER PRIMARY KEY AUTOINCREMENT, name TEXT, attributes TEXT );
Where attributes are not used at the moment.
CREATE TABLE time_line_data_0 ( id INTEGER PRIMARY KEY AUTOINCREMENT, start_time FLOAT, stop_time FLOAT, min_amplitude FLOAT, max_amplitude FLOAT, title TEXT, type TEXT, author TEXT, description TEXT, metrics TEXT, latitude FLOAT, longitude FLOAT, zoom INTEGER );
some_seed, start_time, stop_time, mbuf, netflow_metric_name1, netflow_metric_name2, .. 0, 134123410, 134123420, 0, 4, 246294264, .. 0, 134123420, 134123430, 0, 5, 246134264, .. 0, 134123430, 134123440, 0, 32, 246231568, ..
The script just reads this csv data file and creates entries according to the header of the file into the label database. For each netflow_metric_name[n] there is one entry in the label database and in the data database. For the label database only the columns starting from offset 4 are important, skip the others. The following code snippet shows this:
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # >>>>>>>>>>>> ENTER YOUR CODE HERE: # >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> # # In our csv file, skip the first 4 columns, because they do not contain # any important data. This may be different in your csv file. Enter the # column number with the first x/y plot data. my $offset = 4;
Copyright © 2007 Patrick Boenzli, ETH Zurich | Overview | Download | User Manual | Development |