This is an old revision of the document!
A preliminary schema for a new table:
-- New consolidated interface table -- See MIB-II, IF-MIB, RFC 1229 CREATE TABLE interface ( interfaceid SERIAL, netboxid INT4, moduleid INT4, ifindex INT4 NOT NULL, ifname VARCHAR, ifdescr VARCHAR, iftype INT4, speed DOUBLE PRECISION, ifphysaddress MACADDR, ifadminstatus INT4, ifoperstatus INT4, iflastchange INT4, ifconnectorpresent BOOLEAN, ifpromiscuousmode BOOLEAN, ifalias VARCHAR, -- non IF-MIB values media VARCHAR, vlan INT4, trunk BOOLEAN, duplex CHAR(1) CHECK (duplex='f' OR duplex='h'), -- f=full, h=half to_netboxid INT4, to_interfaceid INT4, CONSTRAINT interface_pkey PRIMARY KEY (interfaceid), CONSTRAINT interface_netboxid_fkey FOREIGN KEY (netboxid) REFERENCES netbox (netboxid) ON UPDATE CASCADE ON DELETE CASCADE, CONSTRAINT interface_moduleid_fkey FOREIGN KEY (moduleid) REFERENCES module (moduleid) ON UPDATE CASCADE ON DELETE SET NULL, CONSTRAINT interface_to_netboxid_fkey FOREIGN KEY (to_netboxid) REFERENCES netbox (netboxid) ON UPDATE CASCADE ON DELETE SET NULL, CONSTRAINT interface_to_interfaceid_fkey FOREIGN KEY (to_interfaceid) REFERENCES interface (interfaceid) ON UPDATE CASCADE ON DELETE SET NULL, CONSTRAINT interface_interfaceid_netboxid_unique UNIQUE (interfaceid, netboxid) );