1 create table switchtypes (
2 switchtype varchar not null primary key,
6 create table switches (
7 switch serial not null primary key,
9 sysname varchar not null,
10 switchtype varchar not null references switchtypes,
11 last_updated timestamp,
12 locked boolean not null default 'f'
16 time timestamp not null,
17 switch integer not null references switches,
18 port integer not null,
19 bytes_in bigint not null,
20 bytes_out bigint not null,
22 primary key ( time, switch, port )
24 create index poll_switch_port on poll ( switch, port );