   vp_local BOOLEAN,
   vp_normal BOOLEAN,
   vp_flood BOOLEAN
-);
-
+
+  /*
+   * TODO: Counters
+   *   Port
+   *   Queue
+   *   FlowTable
+   *   FlowEntry
+   *   Meter
+   *   Bucket
+   *   Group
+   */   
+);
+--- Flow Table Capabilities ----------------------------------------------------
 CREATE TABLE ft_caps
 (
 	id SERIAL PRIMARY KEY,
+
+  /* 
+   * Datapath Id
+   * Datapath can have only 1 table - 1.0
+   * Datapath can have multiple tables - 1.1, 1.2, 1.3, 1.4
+   */
 	dp_id INTEGER references dp_caps(id) NOT NULL,
+
+  /*
+   * Table ID
+   * The ID of a flow table
+   */
   table_id INTEGER,
+
+  /*
+   * Max entries in flow table
+   */
   max_entries INTEGER
+);
+
+-- Field Capabilities ----------------------------------------------------------
+CREATE TABLE field_caps
+(
+  id SERIAL PRIMARY KEY,
+
+  /*
+   * Flow table ID
+   * Each flow table is able to match / and apply actions to a field
+   * field_caps belong to a single flow table
+   */
+  ft_id INTEGER REFERENCES ft_caps(id) NOT NULL,
+
+  /*
+   * Field_Type
+   * Specifies the field from enum FIELD_Types
+   */
+   field_type FIELD_TYPES NOT NULL,
+
+   /*
+    * Specifies what matches/actions are supported with this field
+    */
+    match BOOLEAN,
+    wildcards BOOLEAN,
+    write_setfield BOOLEAN,
+    write_setfield_miss BOOLEAN,
+    apply_setfield BOOLEAN,
+    apply_setfield_miss BOOLEAN
+);
+
+CREATE TYPE FIELD_TYPES AS ENUM (
+  'OFPXMT_OFB_IN_PORT', 
+  'OFPXMT_OFB_IN_PHY_PORT',
+  'OFPXMT_OFB_METADATA',
+  'OFPXMT_OFB_ETH_DST',
+  'OFPXMT_OFB_ETH_SRC',
+  'OFPXMT_OFB_ETH_TYPE'
+);
+
+CREATE TABLE action_capabilities
+(
+  id SERIAL PRIMARY KEY,
+
+  /*
+   * Flow Table ID
+   * a flow table can have many action_capabilities by action type
+   */
+  ft_id INTEGER REFERENCES ft_caps(id) NOT NULL,
+
+  /*
+   * Action Type
+   * specifies the action from the ACTION_TYPES
+   */
+  action_type ACTION_TYPES NOT NULL,
+
+  /*
+   * specifies whether action type supports write/apply
+   */
+  write_actions BOOLEAN,
+  write_actions_miss BOOLEAN,
+  apply_actions BOOLEAN,
+  apply_actions_miss BOOLEAN
+);
+
+CREATE TYPE ACTION_TYPES AS ENUM (
+  --Required--
+  'OFPAT_OUTPUT',
+  'DROP',
+  'OFPAT_GROUP',
+  --Optional--
+  'OFPAT_COPY_TTL_OUT',
+  'OFPAT_COPY_TTL_IN',
+  'OFPAT_SET_MPLS_TTL',
+  'OFPAT_DEC_MPLS_TTL',
+  'OFPAT_PUSH_VLAN',
+  'OFPAT_POP_MPLS',
+  'OFPAT_SET_QUEUE',
+  'OFPAT_SET_NW_TTL',
+  'OFPAT_DEC_NW_TTL',
+  'OFPAT_SET_FIELD',
+  'OFPAT_PUSH_PBB',
+  'OFPAT_POP_PBB',
+  'OFPAT_EXPERIMENTER'
 );
 
 CREATE TABLE match_caps

  -- status_date TIMESTAMP WITH TIME ZONE NOT NULL,  -- date of last change in disp
);

CREATE TABLE packet
(
  id SERIAL PRIMARY KEY,
  subscriber_id INTEGER references subscriber(id) NOT NULL,
  name CHAR(60) NOT NULL
);

CREATE TABLE switch_profile
(
  id SERIAL PRIMARY KEY,
  subscriber_id INTEGER references subscriber(id) NOT NULL,
  name VARCHAR(60) NOT NULL
);

CREATE TABLE dp_caps
(
	id SERIAL PRIMARY KEY,
  profile_id INTEGER references switch_profile(id) NOT NULL,
  -- Virual Ports
	vp_all BOOLEAN, 
  vp_controller BOOLEAN, 
  vp_table BOOLEAN,

  OFPAT_SET_FIELD_ETH_SRC BOOLEAN
);

CREATE TABLE packet
(
  id SERIAL PRIMARY KEY,
  subscriber_id INTEGER references subscriber(id) NOT NULL,
  name CHAR(60) NOT NULL
);

