PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "Documents" (
"Document_ID" INT UNIQUE,
"Document_Name" VARCHAR(255),
"Document_Description" VARCHAR(255),
PRIMARY KEY ("Document_ID")
);

CREATE TABLE "Paragraphs" (
"Paragraph_ID" INT,
"Document_ID" INT,
"Paragraph_Text" VARCHAR(255),
PRIMARY KEY ("Paragraph_ID"),
FOREIGN KEY ("Document_ID") REFERENCES "Documents"("Document_ID")
);

CREATE TABLE "Templates" (
"Template_ID" INT UNIQUE,
"Template_Details" VARCHAR(255),
PRIMARY KEY ("Template_ID")
);





INSERT INTO "Documents" VALUES ("1", "Welcome to NY", "A document about New York City attractions.");
INSERT INTO "Documents" VALUES ("2", "Travel Guide", "A guide for international travel.");
INSERT INTO "Documents" VALUES ("3", "Project Proposal", "Proposal for a new software project.");
INSERT INTO "Documents" VALUES ("4", "Meeting Minutes", "Minutes from the weekly team meeting.");
INSERT INTO "Documents" VALUES ("5", "Welcome to Paris", "A document about Paris attractions.");
INSERT INTO "Documents" VALUES ("6", "Welcome to NY - Part 2", "Continuation of the New York City document.");
INSERT INTO "Paragraphs" VALUES ("101", "1", "New York City, often called NYC, is the most populous city in the United States.");
INSERT INTO "Paragraphs" VALUES ("102", "1", "The Statue of Liberty is a colossal neoclassical sculpture on Liberty Island.");
INSERT INTO "Paragraphs" VALUES ("103", "1", "Times Square is a major commercial intersection, tourist destination, entertainment center, and neighborhood in the Midtown Manhattan section of New York City.");
INSERT INTO "Paragraphs" VALUES ("104", "2", "Before traveling, ensure your passport is valid for at least six months.");
INSERT INTO "Paragraphs" VALUES ("105", "3", "This project aims to streamline data processing workflows.");
INSERT INTO "Paragraphs" VALUES ("106", "1", "Central Park is an urban park in New York City, New York, United States.");
INSERT INTO "Paragraphs" VALUES ("107", "5", "Paris, the capital of France, is a major European city and a global center for art, fashion, gastronomy and culture.");
INSERT INTO "Paragraphs" VALUES ("108", "6", "Broadway shows are a must-see in NYC.");
INSERT INTO "Paragraphs" VALUES ("109", "1", "The Empire State Building is a 102-story Art Deco skyscraper in Midtown Manhattan.");
INSERT INTO "Templates" VALUES ("1001", "Standard Document Template");
INSERT INTO "Templates" VALUES ("1002", "Travel Guide Template");
INSERT INTO "Templates" VALUES ("1003", "Project Proposal Template");
INSERT INTO "Templates" VALUES ("1004", "Meeting Minutes Template");