CREATE TYPE _NODE_TYPE AS ENUM ('junction', 'reservoir', 'tank');

CREATE TYPE _LINK_TYPE AS ENUM ('pipe', 'pump', 'valve');

CREATE TABLE _NODE
(
  ID VARCHAR(32) PRIMARY KEY
, Type _NODE_TYPE  NOT NULL
);

CREATE TABLE _LINK
(
  ID VARCHAR(32) PRIMARY KEY
, Type _LINK_TYPE  NOT NULL
);

CREATE TABLE _CURVE
(
  ID VARCHAR(32) PRIMARY KEY
);

CREATE TABLE _PATTERN
(
  ID VARCHAR(32) PRIMARY KEY
);
