Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Product ID is suppose to be Primary Key and Foreign Key, how can this be fixed? 27 |); 28 29 CREATE TABLE INCLUDES ( 30
27 |); 28 29 CREATE TABLE INCLUDES ( 30 ProductID 31 TID 32 Quantity 33 34 CONSTRAINT INCLUDES PK PRIMARY KEY (ProductID, TID), 35 CONSTRAINT INCLUDES FK FOREIGN KEY (TID) 36 REFERENCES SALES_TRANSACTIONS (TID) 37 % ); 38 39 CREATE TABLE PRODUCT ( 40 ProductID 46 CHAR(4) CHAR (6) INT ProductName ProductPrice CHAR (4) CHAR (2) NOT NULL, NOT NULL, NUMERIC (4,2) NOT NULL, NOT NULL, NOT NULL, 41 42 43 VendorID 44 CategoryID 45 CONSTRAINT PRODUCT_PK PRIMARY KEY (ProductID), CONSTRAINT PRODUCT_FK FOREIGN KEY (ProductID) REFERENCES INCLUDES (ProductID) CHAR (3) CHAR (3) NOT NULL, NOT NULL, NOT NULL, 47 48 49 50 51 CREATE TABLE CUSTOMER ( wwwm 52 Customer ID here are no primary or candidate keys in the referenced table 'INCLUDES' that match the referencing column list in the foreign key 'PRODUCT_FK'. CHAR(10) NOT NULL, Messages Mag 102, Level 15, State 1, Line 47 Incorrect syntax near ')'. Completion time: 2022-11-26T23:25:16.8141626-05:00
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started