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,
"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", "Meeting Minutes 2023-10-26");
INSERT INTO "Documents" VALUES ("2", "Project Proposal Alpha");
INSERT INTO "Documents" VALUES ("3", "Company Policy Handbook");
INSERT INTO "Documents" VALUES ("4", "Research Paper on AI");
INSERT INTO "Documents" VALUES ("5", "Client Contract Draft");
INSERT INTO "Paragraphs" VALUES ("101", "1", "Attendees: John Doe, Jane Smith, Bob Johnson.");
INSERT INTO "Paragraphs" VALUES ("102", "1", "Discussion: Q4 budget review and next steps.");
INSERT INTO "Paragraphs" VALUES ("103", "1", "Action Items: John to follow up on vendor quotes.");
INSERT INTO "Paragraphs" VALUES ("201", "2", "Introduction to Project Alpha objectives.");
INSERT INTO "Paragraphs" VALUES ("202", "2", "Proposed timeline and key milestones.");
INSERT INTO "Paragraphs" VALUES ("203", "2", "Budget allocation for phase one.");
INSERT INTO "Paragraphs" VALUES ("301", "3", "Section 1: Employee Conduct Guidelines.");
INSERT INTO "Paragraphs" VALUES ("302", "3", "Section 2: Data Privacy Policy.");
INSERT INTO "Paragraphs" VALUES ("303", "3", "Section 3: Leave and Absence Procedures.");
INSERT INTO "Paragraphs" VALUES ("304", "3", "Section 4: Health and Safety Regulations.");
INSERT INTO "Paragraphs" VALUES ("401", "4", "Abstract: This paper explores recent advancements in neural networks.");
INSERT INTO "Paragraphs" VALUES ("402", "4", "Methodology: We employed a deep learning approach.");
INSERT INTO "Paragraphs" VALUES ("403", "4", "Results: Our findings indicate significant improvements.");
INSERT INTO "Paragraphs" VALUES ("501", "5", "Agreement between Company X and Client Y.");
INSERT INTO "Paragraphs" VALUES ("502", "5", "Scope of services to be provided.");