root/trunk/mysql.sql

Revision 1, 1.7 kB (checked in by ixs, 16 years ago)

initial checkin of RH revision

Line 
1 CREATE TABLE `FlowSources` (
2   `FlowSrc` int(11) unsigned NOT NULL,
3   `ExportType` varchar(12) NOT NULL default 'NetFlow9',
4   `Hostname` varchar(255) default NULL,
5   `FlowSrcDesc` varchar(255) default NULL,
6   PRIMARY KEY  (`FlowSrc`)
7 ) ENGINE=InnoDB;
8
9 CREATE TABLE `Interfaces` (
10   `FlowSrc` int(11) unsigned NOT NULL,
11   `IntfDesc` varchar(120) default NULL,
12   `IntfIndex` int(11) unsigned NOT NULL,
13   KEY `FlowSrc` (`FlowSrc`),
14   KEY `DevIntfIndex` (`FlowSrc`,`IntfIndex`),
15   CONSTRAINT `FlowSrc` FOREIGN KEY (`FlowSrc`) REFERENCES `FlowSources` (`FlowSrc`) ON DELETE NO ACTION ON UPDATE NO ACTION
16 ) ENGINE=InnoDB;
17
18 CREATE TABLE `Flows` (
19   `FlowSrc` int(11) unsigned NOT NULL,
20   `IPProto` int(11) unsigned NOT NULL default '0',
21   `IPSrc` int(11) unsigned NOT NULL default '0',
22   `IPDst` int(11) unsigned NOT NULL default '0',
23   `IntIn` int(11) unsigned default '0',
24   `IntOut` int(11) unsigned default '0',
25   `PortSrc` smallint(11) unsigned default '0',
26   `PortDst` smallint(11) unsigned default '0',
27   `MaskSrc` int(11) unsigned default '0',
28   `MaskDst` int(11) unsigned default '0',
29   `TimeStart` int(11) unsigned NOT NULL default '0',
30   `TimeStop` int(11) unsigned NOT NULL default '0',
31   `Bytes` int(11) unsigned NOT NULL default '0',
32   `Pakets` int(11) unsigned NOT NULL default '0',
33   KEY `FlowSrc` (`FlowSrc`),
34   KEY `IntfInIndex` (`IntIn`,`FlowSrc`),
35   KEY `IntfOutIndex` (`FlowSrc`,`IntOut`),
36   KEY `TimeStartIndex` (`TimeStart`),
37   KEY `TimeStopIndex` (`TimeStop`),
38   KEY `IPProto` (`IPProto`),
39   KEY `IPSrc` (`IPSrc`),
40   KEY `IPDst` (`IPDst`),
41   CONSTRAINT `f_FlowSrc` FOREIGN KEY (`FlowSrc`) REFERENCES `FlowSources` (`FlowSrc`) ON DELETE NO ACTION ON UPDATE NO ACTION
42 ) ENGINE=InnoDB;
Note: See TracBrowser for help on using the browser.