-- Collection of code snippets by Arne Vajhøj 
-- created to try various things (2003-now) 
CREATE TABLE make (
    id INTEGER NOT NULL,
    name VARCHAR(20),
    PRIMARY KEY(id)
)
GO
CREATE TABLE model (id INTEGER NOT NULL,
    make INTEGER,
    name VARCHAR(20),
    PRIMARY KEY(id),
    FOREIGN KEY (make) REFERENCES make(id)
)
GO

INSERT INTO make VALUES(1, 'Ford')
GO
INSERT INTO make VALUES(2, 'VW')
GO

INSERT INTO model VALUES(1, 1, 'Fiesta')
GO
INSERT INTO model VALUES(2, 1, 'Focus')
GO
INSERT INTO model VALUES(3, 1, 'Mondeo')
GO

INSERT INTO model VALUES(4, 2, 'Polo')
GO
INSERT INTO model VALUES(5, 2, 'Golf')
GO
INSERT INTO model VALUES(6, 2, 'Passat')
GO
