-- examples from Introduction to SQL

CREATE TABLE state (
       abbr char(2) primary key, -- abbreviation
       name char(15)
);

CREATE TABLE person (
       eid int2 primary key, -- entry id
       name char(25),
       phone char(4), -- campus phone
       state char(2) references state(abbr)
);

INSERT INTO state VALUES ('MN', 'Minnesota');
INSERT INTO state VALUES ('WA', 'Washington');
INSERT INTO state (name, abbr) VALUES ('Illinois', 'IL');
INSERT INTO person VALUES (1, 'Dick', '3860', 'WA');
INSERT INTO person VALUES (2, 'Sue' , '3098', 'IL');
INSERT INTO person VALUES (3, 'Chris', '2997');
INSERT INTO person (eid, name) VALUES (4, 'John');

