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 UNIQUE,
"PetType" VARCHAR(20),
"pet_age" INT,
PRIMARY KEY ("PetID")
);

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





INSERT INTO "Student" VALUES ("1", "10");
INSERT INTO "Student" VALUES ("2", "15");
INSERT INTO "Student" VALUES ("3", "20");
INSERT INTO "Student" VALUES ("4", "25");
INSERT INTO "Student" VALUES ("5", "30");
INSERT INTO "Student" VALUES ("6", "35");
INSERT INTO "Student" VALUES ("7", "40");
INSERT INTO "Student" VALUES ("8", "45");
INSERT INTO "Pets" VALUES ("101", "Dog", "3");
INSERT INTO "Pets" VALUES ("102", "Cat", "2");
INSERT INTO "Pets" VALUES ("103", "Parrot", "1");
INSERT INTO "Pets" VALUES ("104", "Hamster", "1");
INSERT INTO "Pets" VALUES ("105", "Fish", "1");
INSERT INTO "Pets" VALUES ("106", "Dog", "5");
INSERT INTO "Pets" VALUES ("107", "Cat", "4");
INSERT INTO "Pets" VALUES ("108", "Rabbit", "2");
INSERT INTO "Pets" VALUES ("109", "Turtle", "10");
INSERT INTO "Pets" VALUES ("110", "Snake", "7");
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");