How do I make multiple columns in one table refer to a foreign key in another table? I want all columns called "SLOT", POSSAM to store a table key mods. NOTE: I'm using the latest version of NETBEANS I do not know if this makes any difference
create table "USE".UPGRADE
(
U_ID INTEGER GENERATED ALWAYS AS IDENTITY not null,
W_ID INTEGER,
MODCAPACITY INTEGER,
OROKINREACTOR BOOLEAN,
LENS INTEGER,
AURASLOT INTEGER,
EXILUSSLOT INTEGER,
POSTURESLOT INTEGER,
SLOT1 INTEGER,
SLOT2 INTEGER,
SLOT3 INTEGER,
SLOT4 INTEGER,
SLOT5 INTEGER,
SLOT6 INTEGER,
SLOT7 INTEGER,
SLOT8 INTEGER,
SLOT9 INTEGER,
SLOT10 INTEGER,
primary key (U_ID),
foreign key(W_ID) references WARFRAMES(W_ID)
);
create table "USE".MODS
(
M_ID INTEGER GENERATED ALWAYS AS IDENTITY not null,
U_ID INTEGER,
NAME CHAR(30) not null unique,
CAPACITYDRAIN INTEGER not null,
POLARITY INTEGER not null,
MODCOMPATIBILITY INTEGER not null,
CONCLAVE INTEGER not null,
QUANTITY INTEGER not null,
RARITY INTEGER not null,
MODLEVEL INTEGER not null,
MODTYPE INTEGER not null,
primary key(M_ID),
foreign key(U_ID) references UPGRADE(U_ID)
);