Getting this error when adding the parts table: Msg 8110, Level 16, State 0, Line 1 Cannot add multiple PRIMARY KEY constraints to table 'Service_Parts'. Getting similar errors for the other tables....The first 2 had no errors but the others have errors.........Here is the code which contains errors..... CREATE TABLE Service_Parts( Part_Number int NOT NULL, Service_ID VARCHAR(80), PRIMARY KEY (Service_ID), PRIMARY KEY (Part_Number), FOREIGN KEY (Part_Number ) REFERENCES Part(Part_Number), FOREIGN KEY (Service_ID) REFERENCES ServiceRecordCalender(Service_ID) ); ServiceRecordCalender Table: CREATE TABLE ServiceRecordCalender( Service_ID VARCHAR(80), DateCalled DATE, DateOfService DATE, Serial_Number int NOT NULL, Technician_ID int NOT NULL, PRIMARY KEY (Service_ID ), FOREIGN KEY (Technician_ID ) REFERENCES Technician(Technician_ID ), FOREIGN KEY (Serial_Number ) REFERENCES Appliance(Serial_Number ), FOREIGN KEY (DateOfService ) REFERENCES Technician(DateOfService ) ); Technician Table: CREATE TABLE Technician( Technician_ID int NOT NULL, DateOfService DATE, OrderParts VARCHAR(80), PRIMARY KEY (Technician_ID) );

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Getting this error when adding the parts table: Msg 8110, Level 16, State 0, Line 1 Cannot add multiple PRIMARY KEY constraints to table 'Service_Parts'.

Getting similar errors for the other tables....The first 2 had no errors but the others have errors.........Here is the code which contains errors..... CREATE TABLE Service_Parts( Part_Number int NOT NULL, Service_ID VARCHAR(80), PRIMARY KEY (Service_ID), PRIMARY KEY (Part_Number), FOREIGN KEY (Part_Number ) REFERENCES Part(Part_Number), FOREIGN KEY (Service_ID) REFERENCES ServiceRecordCalender(Service_ID) ); ServiceRecordCalender Table: CREATE TABLE ServiceRecordCalender( Service_ID VARCHAR(80), DateCalled DATE, DateOfService DATE, Serial_Number int NOT NULL, Technician_ID int NOT NULL, PRIMARY KEY (Service_ID ), FOREIGN KEY (Technician_ID ) REFERENCES Technician(Technician_ID ), FOREIGN KEY (Serial_Number ) REFERENCES Appliance(Serial_Number ), FOREIGN KEY (DateOfService ) REFERENCES Technician(DateOfService ) ); Technician Table: CREATE TABLE Technician( Technician_ID int NOT NULL, DateOfService DATE, OrderParts VARCHAR(80), PRIMARY KEY (Technician_ID) );

Expert Solution
Step 1

Primary key is among one of the most important constraints in databases. A primary key is used to identify each record present in a table uniquely. 

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
SQL Query
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education