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,
"Template_ID" INT,
"Document_Name" 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")
);





INSERT INTO "Documents" VALUES ("1", "101", "Meeting Minutes");
INSERT INTO "Documents" VALUES ("2", "102", "Project Proposal");
INSERT INTO "Documents" VALUES ("3", "103", "Research Paper");
INSERT INTO "Documents" VALUES ("4", "104", "User Manual");
INSERT INTO "Documents" VALUES ("5", "105", "Contract Agreement");
INSERT INTO "Documents" VALUES ("6", "101", "Daily Report");
INSERT INTO "Documents" VALUES ("7", "102", "Marketing Plan");
INSERT INTO "Documents" VALUES ("8", "103", "Technical Specification");
INSERT INTO "Documents" VALUES ("9", "104", "Product Brochure");
INSERT INTO "Documents" VALUES ("10", "105", "Service Level Agreement");
INSERT INTO "Paragraphs" VALUES ("1", "1", "Paragraph 1 of Meeting Minutes.");
INSERT INTO "Paragraphs" VALUES ("2", "1", "Paragraph 2 of Meeting Minutes.");
INSERT INTO "Paragraphs" VALUES ("3", "2", "Introduction to Project Proposal.");
INSERT INTO "Paragraphs" VALUES ("4", "2", "Objectives of the Project.");
INSERT INTO "Paragraphs" VALUES ("5", "2", "Methodology of the Project.");
INSERT INTO "Paragraphs" VALUES ("6", "3", "Abstract of Research Paper.");
INSERT INTO "Paragraphs" VALUES ("7", "3", "Introduction to Research Paper.");
INSERT INTO "Paragraphs" VALUES ("8", "3", "Literature Review.");
INSERT INTO "Paragraphs" VALUES ("9", "3", "Experimental Setup.");
INSERT INTO "Paragraphs" VALUES ("10", "4", "Getting Started with the User Manual.");
INSERT INTO "Paragraphs" VALUES ("11", "5", "Terms and Conditions.");
INSERT INTO "Paragraphs" VALUES ("12", "6", "Daily Report Summary.");
INSERT INTO "Paragraphs" VALUES ("13", "7", "Marketing Plan Overview.");
INSERT INTO "Paragraphs" VALUES ("14", "8", "Technical Specification Details.");
INSERT INTO "Paragraphs" VALUES ("15", "9", "Product Features.");
INSERT INTO "Paragraphs" VALUES ("16", "10", "SLA Scope.");
INSERT INTO "Paragraphs" VALUES ("17", "10", "SLA Responsibilities.");
INSERT INTO "Paragraphs" VALUES ("18", "10", "SLA Performance Metrics.");
INSERT INTO "Paragraphs" VALUES ("19", "10", "SLA Termination Clause.");
INSERT INTO "Paragraphs" VALUES ("20", "1", "Paragraph 3 of Meeting Minutes.");