CREATE TABLE ALIQUET (
  PRIMARY KEY (magna, tellus),
  magna  VARCHAR(42) NOT NULL,
  tellus VARCHAR(42) NOT NULL,
  type   UNSIGNED INT NOT NULL
);

CREATE TABLE CONSEQUAT (
  PRIMARY KEY (fermentum),
  fermentum VARCHAR(42) NOT NULL,
  dederit   VARCHAR(42)
);

CREATE TABLE CURABITUR (
  PRIMARY KEY (gravida),
  gravida VARCHAR(42) NOT NULL,
  amor    VARCHAR(42)
);

CREATE TABLE DIGNISSIM (
  PRIMARY KEY (tellus),
  tellus VARCHAR(42) NOT NULL,
  terra  VARCHAR(42)
);

CREATE TABLE LACUS (
  PRIMARY KEY (magna),
  magna      VARCHAR(42) NOT NULL,
  vestibulum VARCHAR(42),
  fermentum  VARCHAR(42) NOT NULL,
  tempor     VARCHAR(42),
  fugit      VARCHAR(42)
);

CREATE TABLE LIBERO (
  PRIMARY KEY (posuere),
  posuere VARCHAR(42) NOT NULL,
  lacrima VARCHAR(42)
);

CREATE TABLE NEC (
  PRIMARY KEY (magna),
  magna      VARCHAR(42) NOT NULL,
  vestibulum VARCHAR(42),
  fermentum  VARCHAR(42) NOT NULL,
  pulvinar   VARCHAR(42),
  audis      VARCHAR(42),
  gravida    VARCHAR(42) NOT NULL
);

CREATE TABLE QUAM (
  PRIMARY KEY (cras),
  cras  VARCHAR(42) NOT NULL,
  sed   VARCHAR(42),
  magna VARCHAR(42) NOT NULL
);

CREATE TABLE SODALES (
  PRIMARY KEY (magna),
  magna      VARCHAR(42) NOT NULL,
  vestibulum VARCHAR(42),
  fermentum  VARCHAR(42) NOT NULL,
  convallis  VARCHAR(42),
  ipsum      VARCHAR(42)
);

CREATE TABLE SUSCIPIT (
  PRIMARY KEY (orci),
  orci  VARCHAR(42) NOT NULL,
  lorem VARCHAR(42),
  magna VARCHAR(42) NOT NULL,
  type  UNSIGNED INT NOT NULL
);

CREATE TABLE ULTRICES (
  PRIMARY KEY (posuere, magna),
  posuere VARCHAR(42) NOT NULL,
  magna   VARCHAR(42) NOT NULL
);

ALTER TABLE ALIQUET ADD FOREIGN KEY (tellus) REFERENCES DIGNISSIM (tellus);

ALTER TABLE LACUS ADD FOREIGN KEY (fermentum) REFERENCES CONSEQUAT (fermentum);

ALTER TABLE NEC ADD FOREIGN KEY (gravida) REFERENCES CURABITUR (gravida);
ALTER TABLE NEC ADD FOREIGN KEY (fermentum) REFERENCES CONSEQUAT (fermentum);

ALTER TABLE QUAM ADD FOREIGN KEY (magna) REFERENCES SODALES (magna);

ALTER TABLE SODALES ADD FOREIGN KEY (fermentum) REFERENCES CONSEQUAT (fermentum);

ALTER TABLE ULTRICES ADD FOREIGN KEY (magna) REFERENCES LACUS (magna);
ALTER TABLE ULTRICES ADD FOREIGN KEY (posuere) REFERENCES LIBERO (posuere);
