
-- Single-table subclass mapping

create table People (
	ssn         integer,
	name        text not null,
	address     text not null,
	salary      float not null,
	position    text not null,
	bonus       float not null,
	primary key (ssn),
	constraint one_of_three check
               (salary is null and position is null and bonus is null)
               or (salary is not null and position is not null and bonus is null)
               or (salary is not null and position is not null and bonus is not null)
);
