{"city": {"columns": [[0, "ID", "INTEGER", 1, null, 1], [1, "Name", "char(35)", 1, "''", 0], [2, "CountryCode", "char(3)", 1, "''", 0], [3, "District", "char(20)", 1, "''", 0], [4, "Population", "INTEGER", 1, "'0'", 0]], "primary_keys": ["ID"], "foreign_keys": [[0, 0, "country", "CountryCode", "Code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [], "check_constraints": []}, "sqlite_sequence": {"columns": [[0, "name", "", 0, null, 0], [1, "seq", "", 0, null, 0]], "primary_keys": [], "foreign_keys": [], "unique_constraints": [], "check_constraints": []}, "country": {"columns": [[0, "Code", "char(3)", 1, "''", 1], [1, "Name", "char(52)", 1, "''", 0], [2, "Continent", "TEXT", 1, "'Asia'", 0], [3, "Region", "char(26)", 1, "''", 0], [4, "SurfaceArea", "float(10,2)", 1, "'0.00'", 0], [5, "IndepYear", "INTEGER", 0, "NULL", 0], [6, "Population", "INTEGER", 1, "'0'", 0], [7, "LifeExpectancy", "float(3,1)", 0, "NULL", 0], [8, "GNP", "float(10,2)", 0, "NULL", 0], [9, "GNPOld", "float(10,2)", 0, "NULL", 0], [10, "LocalName", "char(45)", 1, "''", 0], [11, "GovernmentForm", "char(45)", 1, "''", 0], [12, "HeadOfState", "char(60)", 0, "NULL", 0], [13, "Capital", "INTEGER", 0, "NULL", 0], [14, "Code2", "char(2)", 1, "''", 0]], "primary_keys": ["Code"], "foreign_keys": [], "unique_constraints": [[[0, 0, "Code"]]], "check_constraints": []}, "countrylanguage": {"columns": [[0, "CountryCode", "char(3)", 1, "''", 1], [1, "Language", "char(30)", 1, "''", 2], [2, "IsOfficial", "TEXT", 1, "'F'", 0], [3, "Percentage", "float(4,1)", 1, "'0.0'", 0]], "primary_keys": ["CountryCode", "Language"], "foreign_keys": [[0, 0, "country", "CountryCode", "Code", "NO ACTION", "NO ACTION", "NONE"]], "unique_constraints": [[[0, 0, "CountryCode"], [1, 1, "Language"]]], "check_constraints": []}}
CREATE TABLE city (
    ID INTEGER NOT NULL  PRIMARY KEY,
    Name char(35) NOT NULL DEFAULT '',
    CountryCode char(3) NOT NULL DEFAULT '',
    District char(20) NOT NULL DEFAULT '',
    Population INTEGER NOT NULL DEFAULT '0',
    FOREIGN KEY (CountryCode) REFERENCES country(Code)
);

CREATE TABLE sqlite_sequence (
    name,
    seq
);

CREATE TABLE country (
    Code char(3) NOT NULL DEFAULT '' PRIMARY KEY,
    Name char(52) NOT NULL DEFAULT '',
    Continent TEXT NOT NULL DEFAULT 'Asia',
    Region char(26) NOT NULL DEFAULT '',
    SurfaceArea float(10,2) NOT NULL DEFAULT '0.00',
    IndepYear INTEGER  DEFAULT NULL,
    Population INTEGER NOT NULL DEFAULT '0',
    LifeExpectancy float(3,1)  DEFAULT NULL,
    GNP float(10,2)  DEFAULT NULL,
    GNPOld float(10,2)  DEFAULT NULL,
    LocalName char(45) NOT NULL DEFAULT '',
    GovernmentForm char(45) NOT NULL DEFAULT '',
    HeadOfState char(60)  DEFAULT NULL,
    Capital INTEGER  DEFAULT NULL,
    Code2 char(2) NOT NULL DEFAULT '',
    UNIQUE (Code)
);

CREATE TABLE countrylanguage (
    CountryCode char(3) NOT NULL DEFAULT '' PRIMARY KEY,
    Language char(30) NOT NULL DEFAULT '' PRIMARY KEY,
    IsOfficial TEXT NOT NULL DEFAULT 'F',
    Percentage float(4,1) NOT NULL DEFAULT '0.0',
    PRIMARY KEY (CountryCode, Language),
    UNIQUE (CountryCode, Language),
    FOREIGN KEY (CountryCode) REFERENCES country(Code)
);