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 "Has_Pet" (
"StuID" INT,
FOREIGN KEY ("StuID") REFERENCES "Student"("StuID")
);

CREATE TABLE "Pets" (
"PetID" INT,
"PetType" VARCHAR(20),
"pet_age" INT,
"weight" FLOAT,
PRIMARY KEY ("PetID")
);

CREATE TABLE "Student" (
"StuID" INT,
"Age" INT,
PRIMARY KEY ("StuID")
);





INSERT INTO "Student" VALUES ("1", "20");
INSERT INTO "Student" VALUES ("2", "22");
INSERT INTO "Student" VALUES ("3", "19");
INSERT INTO "Student" VALUES ("4", "21");
INSERT INTO "Student" VALUES ("5", "23");
INSERT INTO "Student" VALUES ("6", "20");
INSERT INTO "Student" VALUES ("7", "18");
INSERT INTO "Student" VALUES ("8", "24");
INSERT INTO "Student" VALUES ("9", "22");
INSERT INTO "Student" VALUES ("10", "21");
INSERT INTO "Pets" VALUES ("101", "Dog", "5", "25.5");
INSERT INTO "Pets" VALUES ("102", "Cat", "3", "10.2");
INSERT INTO "Pets" VALUES ("103", "Dog", "7", "30.0");
INSERT INTO "Pets" VALUES ("104", "Parrot", "2", "0.5");
INSERT INTO "Pets" VALUES ("105", "Cat", "4", "12.0");
INSERT INTO "Pets" VALUES ("106", "Rabbit", "1", "3.3");
INSERT INTO "Pets" VALUES ("107", "Dog", "2", "20.0");
INSERT INTO "Pets" VALUES ("108", "Parrot", "5", "0.7");
INSERT INTO "Pets" VALUES ("109", "Rabbit", "3", "4.0");
INSERT INTO "Pets" VALUES ("110", "Cat", "6", "9.8");
INSERT INTO "Pets" VALUES ("111", "Dog", "10", "35.0");
INSERT INTO "Pets" VALUES ("112", "Hamster", "1", "0.2");
INSERT INTO "Pets" VALUES ("113", "Hamster", "2", "0.3");
INSERT INTO "Pets" VALUES ("114", "Rabbit", "4", "3.8");
INSERT INTO "Pets" VALUES ("115", "Parrot", "3", "0.6");
INSERT INTO "Has_Pet" VALUES ("1");
INSERT INTO "Has_Pet" VALUES ("2");
INSERT INTO "Has_Pet" VALUES ("3");
INSERT INTO "Has_Pet" VALUES ("4");
INSERT INTO "Has_Pet" VALUES ("5");
INSERT INTO "Has_Pet" VALUES ("6");
INSERT INTO "Has_Pet" VALUES ("7");
INSERT INTO "Has_Pet" VALUES ("8");
INSERT INTO "Has_Pet" VALUES ("9");
INSERT INTO "Has_Pet" VALUES ("10");