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"),
FOREIGN KEY ("Template_ID") REFERENCES "Templates"("Template_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 "Templates" VALUES ("1", "Standard Business Letter");
INSERT INTO "Templates" VALUES ("2", "Marketing Brochure Template");
INSERT INTO "Templates" VALUES ("3", "Technical Report Template");
INSERT INTO "Templates" VALUES ("4", "Legal Contract Template");
INSERT INTO "Templates" VALUES ("5", "Meeting Minutes Template");
INSERT INTO "Documents" VALUES ("101", "1", "Client Welcome Letter");
INSERT INTO "Documents" VALUES ("102", "2", "Product Launch Brochure");
INSERT INTO "Documents" VALUES ("103", "3", "Annual Performance Report");
INSERT INTO "Documents" VALUES ("104", "1", "Follow-up Email");
INSERT INTO "Documents" VALUES ("105", "4", "Service Agreement");
INSERT INTO "Documents" VALUES ("106", "3", "Project Status Update");
INSERT INTO "Documents" VALUES ("107", "5", "Board Meeting Minutes");
INSERT INTO "Documents" VALUES ("108", "2", "Company Profile");
INSERT INTO "Documents" VALUES ("109", "1", "Invoice Reminder");
INSERT INTO "Documents" VALUES ("110", "3", "Research Paper Draft");
INSERT INTO "Paragraphs" VALUES ("1", "101", "Dear Valued Client,");
INSERT INTO "Paragraphs" VALUES ("2", "101", "Welcome to our services.");
INSERT INTO "Paragraphs" VALUES ("3", "101", "We look forward to a successful partnership.");
INSERT INTO "Paragraphs" VALUES ("4", "101", "Sincerely, The Team");
INSERT INTO "Paragraphs" VALUES ("5", "102", "Introducing our new product!");
INSERT INTO "Paragraphs" VALUES ("6", "102", "Key features include X, Y, and Z.");
INSERT INTO "Paragraphs" VALUES ("7", "102", "Available now for a limited time.");
INSERT INTO "Paragraphs" VALUES ("8", "102", "Visit our website for more details.");
INSERT INTO "Paragraphs" VALUES ("9", "102", "Contact us today!");
INSERT INTO "Paragraphs" VALUES ("10", "103", "Executive Summary: This report details our annual performance.");
INSERT INTO "Paragraphs" VALUES ("11", "103", "Financial Highlights: Revenue increased by 15%.");
INSERT INTO "Paragraphs" VALUES ("12", "103", "Operational Achievements: Streamlined processes.");
INSERT INTO "Paragraphs" VALUES ("13", "103", "Future Outlook: Continued growth expected.");
INSERT INTO "Paragraphs" VALUES ("14", "103", "Conclusion: A successful year.");
INSERT INTO "Paragraphs" VALUES ("15", "103", "Appendix A: Data Tables.");
INSERT INTO "Paragraphs" VALUES ("16", "103", "Appendix B: Charts and Graphs.");
INSERT INTO "Paragraphs" VALUES ("17", "104", "Following up on our previous discussion.");
INSERT INTO "Paragraphs" VALUES ("18", "104", "Please let us know if you have any questions.");
INSERT INTO "Paragraphs" VALUES ("19", "105", "This Service Agreement "Agreement" is entered into...");
INSERT INTO "Paragraphs" VALUES ("20", "105", "Scope of Services: As outlined in Schedule A.");
INSERT INTO "Paragraphs" VALUES ("21", "105", "Payment Terms: Net 30 days.");
INSERT INTO "Paragraphs" VALUES ("22", "105", "Term and Termination: This Agreement shall commence...");
INSERT INTO "Paragraphs" VALUES ("23", "105", "Governing Law: State of California.");
INSERT INTO "Paragraphs" VALUES ("24", "105", "Signatures: Client and Service Provider.");
INSERT INTO "Paragraphs" VALUES ("25", "106", "Project Alpha is on track.");
INSERT INTO "Paragraphs" VALUES ("26", "106", "Milestone 1 completed ahead of schedule.");
INSERT INTO "Paragraphs" VALUES ("27", "106", "Next steps: Begin Milestone 2.");
INSERT INTO "Paragraphs" VALUES ("28", "107", "Meeting called to order at 9:00 AM.");
INSERT INTO "Paragraphs" VALUES ("29", "107", "Attendees: John Doe, Jane Smith, etc.");
INSERT INTO "Paragraphs" VALUES ("30", "107", "Agenda Item 1: Review of Q1 performance.");
INSERT INTO "Paragraphs" VALUES ("31", "107", "Discussion: Strong results in sales.");
INSERT INTO "Paragraphs" VALUES ("32", "107", "Action Item: Develop new marketing strategy.");
INSERT INTO "Paragraphs" VALUES ("33", "107", "Meeting adjourned at 10:30 AM.");
INSERT INTO "Paragraphs" VALUES ("34", "108", "About Our Company: Leading innovator in technology.");
INSERT INTO "Paragraphs" VALUES ("35", "108", "Our Mission: To provide cutting-edge solutions.");
INSERT INTO "Paragraphs" VALUES ("36", "108", "Our Vision: To be the global leader.");
INSERT INTO "Paragraphs" VALUES ("37", "109", "This is a reminder that your invoice is overdue.");
INSERT INTO "Paragraphs" VALUES ("38", "109", "Please remit payment at your earliest convenience.");
INSERT INTO "Paragraphs" VALUES ("39", "110", "Introduction to the research topic.");
INSERT INTO "Paragraphs" VALUES ("40", "110", "Literature Review: Previous studies on the subject.");
INSERT INTO "Paragraphs" VALUES ("41", "110", "Methodology: How the research was conducted.");
INSERT INTO "Paragraphs" VALUES ("42", "110", "Results: Key findings from the study.");
INSERT INTO "Paragraphs" VALUES ("43", "110", "Discussion: Interpretation of the results.");
INSERT INTO "Paragraphs" VALUES ("44", "110", "Conclusion: Summary of findings and implications.");
INSERT INTO "Paragraphs" VALUES ("45", "110", "Future Work: Areas for further research.");
INSERT INTO "Paragraphs" VALUES ("46", "110", "References: List of cited sources.");
INSERT INTO "Paragraphs" VALUES ("47", "110", "Acknowledgements: Thanks to contributors.");