CREATE TABLE ALIQUET (
  PRIMARY KEY (magna, tellus),
  magna  VARCHAR(42) NOT NULL,
  tellus VARCHAR(42) 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 LIBERO (
  PRIMARY KEY (posuere),
  posuere VARCHAR(42) NOT NULL,
  lacrima VARCHAR(42)
);

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

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

CREATE TABLE TRISTIS (
  PRIMARY KEY (magna),
  magna      VARCHAR(42) NOT NULL,
  vestibulum VARCHAR(42),
  fermentum  VARCHAR(42) NOT NULL,
  type       UNSIGNED INT NOT NULL,
  convallis  VARCHAR(42) NULL,
  ipsum      VARCHAR(42) NULL,
  pulvinar   VARCHAR(42) NULL,
  audis      VARCHAR(42) NULL,
  gravida    VARCHAR(42) NULL,
  tempor     VARCHAR(42) NULL,
  fugit      VARCHAR(42) 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 ALIQUET ADD FOREIGN KEY (magna) REFERENCES TRISTIS (magna);

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

ALTER TABLE SUSCIPIT ADD FOREIGN KEY (magna) REFERENCES TRISTIS (magna);

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

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