CREATE TABLE department (
name CHAR(20) NOT NULL,
PRIMARY KEY (name));

INSERT INTO department(name) VALUES('Accounting');
INSERT INTO department(name) VALUES('Marketing');
INSERT INTO department(name) VALUES('Research');

CREATE TABLE employee (
name CHAR(20) NOT NULL,
age INT NOT NULL,
salary INT NOT NULL,
depname CHAR(20) NOT NULL,
FOREIGN KEY (depname) REFERENCES department(name),
PRIMARY KEY (name));

INSERT INTO employee(name, age, salary, depname) VALUES('Mike', 34, 3000, 'Accounting');
INSERT INTO employee(name, age, salary, depname) VALUES('Paul', 30, 4000, 'Marketing');
INSERT INTO employee(name, age, salary, depname) VALUES('Jane', 47, 3500, 'Marketing');
INSERT INTO employee(name, age, salary, depname) VALUES('Sue', 27, 3000, 'Research');
INSERT INTO employee(name, age, salary, depname) VALUES('Dave', 51, 2000, 'Research');
