This is the error I get when I run my "pens table" on SQL+).<br><br>ERROR at line 11:<br>ORA-02270: no matching unique or primary key for this column-list<br><br><br>The following are just 3 samples of my tables (services, treatments, pens).<br>I really don’t understand the error because I already set up a primary key in the treatment table which is the “date_service, pets_pet_id, and services_service_id”<br><br>Thanks.<br><br>CREATE TABLE services (<br>service_id NUMBER(5),<br>type_service VARCHAR2(20) NOT NULL,<br>fee NUMBER(5) NOT NULL,<br> CONSTRAINT services_service_id_pk PRIMARY KEY (service_id));<br>/<br><br>CREATE TABLE treatments (<br>date_service DATE,<br>date_prior_svc DATE,<br>pets_pet_id NUMBER(5),<br>services_service_id NUMBER(5),<br>fee_increment NUMBER(5,0),<br> CONSTRAINT treatments_pets_pet_id_fk FOREIGN KEY(pets_pet_id)<br> references pets(pet_id),<br> CONSTRAINT treatments_services_service_id FOREIGN KEY(services_service_id)<br> references services(service_id),<br> CONSTRAINT treatments_date_service PRIMARY KEY(date_service,pets_pet_id,services_service_id));<br>/<br><br>CREATE TABLE pens(<br>loc_code VARCHAR2(4),<br>equip CHAR(1) NOT NULL,<br>num_days NUMBER(3) NOT NULL,<br>treatments_date_service DATE,<br>treatments_pets_pet_id NUMBER(5),<br>treatments_services_service_id NUMBER (5),<br>CONSTRAINT loc_code_pk PRIMARY KEY (loc_code, treatments_date_service, treatments_pets_pet_id, treatments_services_service_id),<br>CONSTRAINT equip_ck CHECK (equip IN ('y','n')),<br>CONSTRAINT treatments_date_service FOREIGN KEY(treatments_date_service)<br> references treatments(date_service),<br>CONSTRAINT treatments_pets_pet_id FOREIGN KEY(treatments_pets_pet_id)<br> references treatments(pets_pet_id),<br>CONSTRAINT treatments_services_service_id FOREIGN KEY (treatments_services_service_id)<br> references treatments(services_service_id));<br>/<br><br>