CREATE TABLE Vector3 (id INTEGER PRIMARY KEY AUTOINCREMENT, x REAL, y REAL, z REAL);

CREATE TABLE Stats (id INTEGER PRIMARY KEY AUTOINCREMENT, Strength INTEGER, Endurance INTEGER, Intelligence INTEGER, Wisdom INTEGER, Charisma INTEGER);

CREATE TABLE Skills (id INTEGER PRIMARY KEY AUTOINCREMENT, Artisan INTEGER, Culinary INTEGER, Ranged INTEGER, Melee INTEGER, Acrobatics INTEGER, Prestidigitation INTEGER, Engineering INTEGER, Metalworking INTEGER, Language INTEGER, Medicine INTEGER, Alchemy INTEGER, Fishing INTEGER, Mining INTEGER, Survival INTEGER, Gardening INTEGER, History INTEGER);

CREATE TABLE DerivedStats (id INTEGER PRIMARY KEY AUTOINCREMENT, Hitpoints INTEGER, Stamina INTEGER, Perception INTEGER, Luck INTEGER, Stealth INTEGER, Attractiveness INTEGER, Affluence INTEGER, Holyness INTEGER);

CREATE TABLE Entity (id INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT, vector3_id INTEGER, stats_id INTEGER, derivedstats_id INTEGER, skills_id INTEGER
, FOREIGN KEY(vector3_id) REFERENCES Vector3(id)
, FOREIGN KEY(stats_id) REFERENCES Stats(id)
, FOREIGN KEY(derivedstats_id) REFERENCES DerivedStats(id)
, FOREIGN KEY(skills_id) REFERENCES Skills(id));

CREATE TABLE Item (id INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT, BaseValue INTEGER);

CREATE TABLE Phenomenon (id INTEGER PRIMARY KEY AUTOINCREMENT, Name TEXT);

