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),
"Other_Details" 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_Q1_2023", "Quarterly financial report for Q1 2023");
INSERT INTO "Documents" VALUES ("2", "Project_Proposal_A", "Proposal for Project Alpha");
INSERT INTO "Documents" VALUES ("3", "Meeting_Minutes_0510", "Minutes from the meeting on May 10th");
INSERT INTO "Documents" VALUES ("4", "Policy_Update_HR", "Human Resources policy update");
INSERT INTO "Documents" VALUES ("5", "Research_Paper_AI", "Research paper on Artificial Intelligence");
INSERT INTO "Documents" VALUES ("6", "Travel_Itinerary_Korea", "Travel itinerary for the business trip to Korea");
INSERT INTO "Documents" VALUES ("7", "Product_Spec_V2", "Version 2 of product specifications");
INSERT INTO "Paragraphs" VALUES ("101", "1", "This report summarizes the financial performance for the first quarter.", "Financial overview");
INSERT INTO "Paragraphs" VALUES ("102", "1", "Revenue increased by 15% compared to the previous quarter.", "Key metrics");
INSERT INTO "Paragraphs" VALUES ("103", "2", "The objective of Project Alpha is to streamline operations.", "Project goals");
INSERT INTO "Paragraphs" VALUES ("104", "3", "Attendees discussed the new marketing strategy.", "Discussion points");
INSERT INTO "Paragraphs" VALUES ("105", "4", "All employees must adhere to the updated HR policies.", "Compliance");
INSERT INTO "Paragraphs" VALUES ("106", "5", "Deep learning models show promising results in image recognition.", "AI research");
INSERT INTO "Paragraphs" VALUES ("107", "6", "The trip to Korea will include meetings with key partners.", "Travel details");
INSERT INTO "Paragraphs" VALUES ("108", "6", "We will visit the Seoul office in Korea on Tuesday.", "Meeting schedule");
INSERT INTO "Paragraphs" VALUES ("109", "7", "The new product features include enhanced security.", "Feature list");
INSERT INTO "Paragraphs" VALUES ("110", "1", "Future projections indicate continued growth.", "Outlook");
INSERT INTO "Paragraphs" VALUES ("111", "2", "Budget allocation for Project Alpha is still under review.", "Budget status");
INSERT INTO "Paragraphs" VALUES ("112", "6", "Cultural insights for Korea are provided in the appendix.", "Cultural notes");
INSERT INTO "Templates" VALUES ("1", "Standard Report Template");
INSERT INTO "Templates" VALUES ("2", "Project Proposal Template");
INSERT INTO "Templates" VALUES ("3", "Meeting Minutes Template");
INSERT INTO "Templates" VALUES ("4", "HR Policy Template");
INSERT INTO "Templates" VALUES ("5", "Research Paper Template");
INSERT INTO "Templates" VALUES ("6", "Travel Itinerary Template");