File: schema.postgresql

package info (click to toggle)
bandwidthd 2.0.1%2Bcvs20050208-10
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,048 kB
  • ctags: 378
  • sloc: sh: 3,169; ansic: 1,974; php: 596; yacc: 202; makefile: 131; lex: 33
file content (65 lines) | stat: -rw-r--r-- 1,428 bytes parent folder | download
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
56
57
58
59
60
61
62
63
64
65
CREATE TABLE bd_rx_log
(sensor_id int,
ip inet,
timestamp timestamp with time zone DEFAULT now(),
sample_duration int,
total int,
icmp int,
udp int,
tcp int,
ftp int,
http int,
p2p int);
create index bd_rx_log_sensor_id_ip_timestamp_idx on bd_rx_log (sensor_id, ip, timestamp);
create index bd_rx_log_sensor_id_timestamp_idx on bd_rx_log(sensor_id, timestamp);

CREATE TABLE bd_tx_log
(sensor_id int,
ip inet,
timestamp timestamp with time zone DEFAULT now(),
sample_duration int,
total int,
icmp int,
udp int,
tcp int,
ftp int,
http int,
p2p int);
create index bd_tx_log_sensor_id_ip_timestamp_idx on bd_tx_log (sensor_id, ip, timestamp);
create index bd_tx_log_sensor_id_timestamp_idx on bd_tx_log(sensor_id, timestamp);

CREATE TABLE bd_rx_total_log
(sensor_id int,
ip inet,
timestamp timestamp with time zone DEFAULT now(),
sample_duration int,
total int,
icmp int,
udp int,
tcp int,
ftp int,
http int,
p2p int);
create index bd_rx_total_log_sensor_id_timestamp_ip_idx on bd_rx_total_log (sensor_id, timestamp);


CREATE TABLE bd_tx_total_log
(sensor_id int,
ip inet,
timestamp timestamp with time zone DEFAULT now(),
sample_duration int,
total int,
icmp int,
udp int,
tcp int,
ftp int,
http int,
p2p int);
create index bd_tx_total_log_sensor_id_timestamp_ip_idx on bd_tx_total_log (sensor_id, timestamp);

CREATE TABLE sensors
(
sensor_id serial PRIMARY KEY,
sensor_name varchar,
last_connection timestamp with time zone
);