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", "Sales figures for Brazil show significant growth.");
INSERT INTO "Paragraphs" VALUES ("102", "1", "Ireland market share increased by 5%.");
INSERT INTO "Paragraphs" VALUES ("103", "2", "Financial overview for Q1.");
INSERT INTO "Paragraphs" VALUES ("104", "3", "Proposed budget for the new project.");
INSERT INTO "Paragraphs" VALUES ("105", "4", "Analysis of the European market, including Ireland.");
INSERT INTO "Paragraphs" VALUES ("106", "4", "Key findings for Brazil.");
INSERT INTO "Paragraphs" VALUES ("107", "5", "This paper discusses the economy of Brazil.");
INSERT INTO "Paragraphs" VALUES ("108", "5", "A case study on Ireland.");
INSERT INTO "Paragraphs" VALUES ("109", "6", "Flight details to Brazil.");
INSERT INTO "Paragraphs" VALUES ("110", "6", "Accommodation in Ireland.");
INSERT INTO "Paragraphs" VALUES ("111", "1", "Additional data for the UK.");
INSERT INTO "Paragraphs" VALUES ("112", "2", "Revenue from Germany.");
INSERT INTO "Paragraphs" VALUES ("113", "3", "Project scope details.");
INSERT INTO "Paragraphs" VALUES ("114", "4", "Competitor analysis.");
INSERT INTO "Paragraphs" VALUES ("115", "5", "Methodology section.");
INSERT INTO "Templates" VALUES ("1", "Standard Report Template");
INSERT INTO "Templates" VALUES ("2", "Financial Template");
INSERT INTO "Templates" VALUES ("3", "Project Proposal Template");
INSERT INTO "Templates" VALUES ("4", "Market Research Template");