I have two tables, 'PublishedBook' and 'TextBook', which specialize "Items" entity. 'PublishedBook' and 'TextBook' cover 'items'.No overlapping as well. I think that to illustrate this I need to do something impossible like this;
create table TextBook
(
itemNo char(5),
semester varchar(5),
section varchar(10),
pYear int,
constraint TextBookPK primary key(itemNo),
);
create table PublishedBook
(
itemNo char(5),
edition varchar(5),
constraint PublishebookPK primary key(itemNo)
);
create table Item
(
itemNo char(5) ,
title varchar(10),
description varchar(100),
constraint itemPK primary key(itemNo),
constraint itemFK foreign key(itemNo) references PublishedBook(itemNo)
constraint itemFK2 foreign key(itemNo) references TextBook(itemNo)
);
Make the 'itemNo' of Item table refer to both primary keys of PublishedBook and TextBook.
Can anyone please explain me how can I go through this?