1-- The pages meta
2CREATE TABLE PAGES
3(
4    ID        TEXT NOT NULL, -- The page id
5    CANONICAL TEXT NOT NULL  -- The canonical value should be unique
6);
7CREATE UNIQUE INDEX PAGES_UK ON PAGES (ID, CANONICAL);
8
9
10-- one canonical, multiple page id alias
11CREATE TABLE PAGES_ALIAS
12(
13    CANONICAL TEXT,  -- The canonical value
14    ALIAS     TEXT   -- The alias value
15);
16
17CREATE UNIQUE INDEX PAGES_ALIAS_UK ON PAGES_ALIAS (CANONICAL, ALIAS);
18