Thank you for the reply. Result from the above shortcodes:
CREATE TABLE class
(
id_class
int(1) NOT NULL AUTO_INCREMENT,
name
int(11) NOT NULL,
id_teacher
int(1) NOT NULL,
PRIMARY KEY (id_class
),
KEY id_teacher
(id_teacher
),
CONSTRAINT class_ibfk_1
FOREIGN KEY (id_teacher
) REFERENCES teachers
(id_teacher
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
CREATE TABLE teachers
(
id_teacher
int(1) NOT NULL AUTO_INCREMENT,
forename
varchar(16) NOT NULL,
surname
varchar(16) NOT NULL,
phone
varchar(10) NOT NULL,
PRIMARY KEY (id_teacher
)
) ENGINE=InnoDB DEFAULT CHARSET=latin1