SQL语言:
CREATE TABLE Class (
Class_ID INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(255)
) type=innodb;
CREATE TABLE Student(
Student_ID INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
Name VARCHAR(255),
c_ID INT UNSIGNED NOT NULL,
FOREIGN KEY(c_ID) REFERENCES Class(Class_ID)
ON DELETE CASCADE
ON UPDATE CASCADE
);
使用ERwin反向工程生成MySQL数据库的Physical Modal[物理数据模型] <->
// Proudly powered by Apache, PHP, MySQL, WordPress, Bootstrap, etc,.