CREATE TABLE Articles (
	Id INTEGER PRIMARY KEY AUTOINCREMENT, 
    DisplayName TEXT UNIQUE,
    FileName TEXT UNIQUE,
    URL TEXT UNIQUE,
    CreatedAt TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP
);

CREATE TABLE Tags (
	Id INTEGER PRIMARY KEY AUTOINCREMENT, 
    Name TEXT
);

CREATE TABLE ArticlesToTags (
    ArticleId INTEGER,
    TagId INTEGER,
    FOREIGN KEY(ArticleId) REFERENCES Articles(Id),
    FOREIGN KEY(TagId) REFERENCES Tags(Id)
);
