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 UNIQUE,
"Template_Details" VARCHAR(255),
PRIMARY KEY ("Template_ID")
);





INSERT INTO "Documents" VALUES ("1", "Customer reviews", "Collection of customer feedback and testimonials.");
INSERT INTO "Documents" VALUES ("2", "Product Specifications", "Detailed specifications for various products.");
INSERT INTO "Documents" VALUES ("3", "Employee Handbook", "Guidelines and policies for employees.");
INSERT INTO "Documents" VALUES ("4", "Marketing Brochure", "Promotional material for new services.");
INSERT INTO "Documents" VALUES ("5", "Financial Report", "Annual financial performance summary.");
INSERT INTO "Paragraphs" VALUES ("101", "1", "The new product received overwhelmingly positive feedback.");
INSERT INTO "Paragraphs" VALUES ("102", "1", "Many customers highlighted the ease of use and intuitive interface.");
INSERT INTO "Paragraphs" VALUES ("103", "1", "Some users suggested minor improvements for future updates.");
INSERT INTO "Paragraphs" VALUES ("104", "2", "Processor: Intel Core i7, 16GB RAM.");
INSERT INTO "Paragraphs" VALUES ("105", "3", "Employees are expected to adhere to the code of conduct.");
INSERT INTO "Paragraphs" VALUES ("106", "1", "Overall satisfaction rates exceeded expectations.");
INSERT INTO "Paragraphs" VALUES ("107", "4", "Discover our innovative solutions for your business needs.");
INSERT INTO "Paragraphs" VALUES ("108", "5", "Revenue increased by 15% in the last fiscal year.");
INSERT INTO "Paragraphs" VALUES ("109", "1", "A few negative comments were related to shipping delays.");
INSERT INTO "Paragraphs" VALUES ("110", "2", "Storage: 512GB SSD, Graphics: NVIDIA GeForce RTX 3060.");
INSERT INTO "Templates" VALUES ("1001", "Standard Document Template");
INSERT INTO "Templates" VALUES ("1002", "Review Summary Template");
INSERT INTO "Templates" VALUES ("1003", "Technical Specification Template");
INSERT INTO "Templates" VALUES ("1004", "Employee Policy Template");
INSERT INTO "Templates" VALUES ("1005", "Marketing Campaign Template");