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,
"Template_Details" VARCHAR(255),
PRIMARY KEY ("Template_ID")
);





INSERT INTO "Documents" VALUES ("1", "Report A", "Annual Sales Report");
INSERT INTO "Documents" VALUES ("2", "Report B", "Quarterly Financials");
INSERT INTO "Documents" VALUES ("3", "Report C", "Project Proposal");
INSERT INTO "Documents" VALUES ("4", "Report D", "Market Analysis");
INSERT INTO "Documents" VALUES ("5", "Report E", "Research Paper");
INSERT INTO "Documents" VALUES ("6", "Report F", "Travel Itinerary");
INSERT INTO "Paragraphs" VALUES ("101", "1", "This report summarizes the sales performance in Brazil for Q1.");
INSERT INTO "Paragraphs" VALUES ("102", "1", "Key findings include growth in the Ireland market.");
INSERT INTO "Paragraphs" VALUES ("103", "2", "Financial data for the European region, including Ireland.");
INSERT INTO "Paragraphs" VALUES ("104", "3", "Proposal for a new initiative in Brazil.");
INSERT INTO "Paragraphs" VALUES ("105", "4", "Market trends in Asia and Europe.");
INSERT INTO "Paragraphs" VALUES ("106", "5", "Research on economic development in Brazil.");
INSERT INTO "Paragraphs" VALUES ("107", "6", "Travel plans for Ireland.");
INSERT INTO "Paragraphs" VALUES ("108", "1", "Additional details for Brazil.");
INSERT INTO "Paragraphs" VALUES ("109", "2", "Further analysis of Ireland.");
INSERT INTO "Paragraphs" VALUES ("110", "3", "Project scope for Brazil.");
INSERT INTO "Paragraphs" VALUES ("111", "4", "Market overview for Ireland.");
INSERT INTO "Paragraphs" VALUES ("112", "5", "Case study on Brazil.");
INSERT INTO "Paragraphs" VALUES ("113", "6", "Accommodation details for Ireland.");
INSERT INTO "Templates" VALUES ("1", "Standard Report Template");
INSERT INTO "Templates" VALUES ("2", "Financial Statement Template");
INSERT INTO "Templates" VALUES ("3", "Project Proposal Template");
INSERT INTO "Templates" VALUES ("4", "Marketing Analysis Template");
INSERT INTO "Templates" VALUES ("5", "Academic Paper Template");