Вы можете использовать одну таблицу со столбцом дискриминатора
Пример
CREATE TABLE property (
id INT AUTO_INCREMENT,
name VARCHAR(255),
/* some data */
PRIMARY KEY (id)
);
CREATE TABLE contract (
id INT AUTO_INCREMENT,
property_id INT NOT NULL,
type VARCHAR(32) CHECK ( type IN ('rent', 'sale') ),
PRIMARY KEY (id),
FOREIGN KEY (property_id)
REFERENCES property(id) ON DELETE CASCADE
);
CREATE TABLE Rent (
id INT AUTO_INCREMENT,
/* some data */
contract_id INT NOT NULL,
contract_type VARCHAR(32) CHECK ( contract_type = 'rent'),
PRIMARY KEY (id),
FOREIGN KEY (contract_id)
REFERENCES contact(id) ON DELETE CASCADE
);
CREATE TABLE Sale (
id INT AUTO_INCREMENT,
/* some data */
contract_id INT NOT NULL,
contract_type VARCHAR(32) CHECK ( contract_type = 'sale'),
PRIMARY KEY (id),
FOREIGN KEY (contract_id)
REFERENCES contact(id) ON DELETE CASCADE
);