Question
what is these codes insert into values()... CREATE TABLE [Car] ( [CarID] varchar(30), [SerialNumber] varchar(50), [Model] varchar(30), [Colour] varchar(30), [Year] varchar(20), PRIMARY KEY ([CarID]) );
what is these codes insert into
values()...
CREATE TABLE [Car] ( [CarID] varchar(30), [SerialNumber] varchar(50), [Model] varchar(30), [Colour] varchar(30), [Year] varchar(20), PRIMARY KEY ([CarID]) );
CREATE TABLE [ServiceTicket] ( [ServiceticketID] varchar(40), [Serviceticketnumber] varchar(40), [CarID] varchar(30), [CustomerID] int, [Datarecieved] varchar(30), [Comments] varchar(100), [Datareturnedcustomer] varchar(100), PRIMARY KEY ([ServiceticketID]), CONSTRAINT [FK_ServiceTicket.CustomerID] FOREIGN KEY ([CustomerID]) REFERENCES [Customer]([CustomerID]), CONSTRAINT [FK_ServiceTicket.CarID] FOREIGN KEY ([CarID]) REFERENCES [Car]([CarID]) );
CREATE TABLE [ServiceMechanic] ( [ServicemechanicID] varchar(40), [ServiceticketID] varchar(40), [ServiceID] int, [MechanicID] int, [Hours] varchar(10), [Comment] varchar(100), [Rate] varchar(40), PRIMARY KEY ([ServicemechanicID]), CONSTRAINT [FK_ServiceMechanic.MechanicID] FOREIGN KEY ([MechanicID]) REFERENCES [Mechanic]([MechanicID]), CONSTRAINT [FK_ServiceMechanic.ServiceID] FOREIGN KEY ([ServiceID]) REFERENCES [Service]([ServiceID]), CONSTRAINT [FK_ServiceMechanic.ServiceticketID] FOREIGN KEY ([ServiceticketID]) REFERENCES [ServiceTicket]([ServiceticketID]) );
CREATE TABLE [Parts] ( [PartID] varchar(30), [Partnumber] varchar(30), [Descrition] varchar(100), [Purchaseprice] varchar(80), [Retailprice] varchar(30), PRIMARY KEY ([PartID]) );
CREATE TABLE [PartUsed] ( [PartusedID] int identity(1,1), [PartID] varchar(30), [ServiceticketID] varchar(40), [Number used] varchar(40), [Price] varchar(30), PRIMARY KEY ([PartusedID]), CONSTRAINT [FK_PartUsed.ServiceticketID] FOREIGN KEY ([ServiceticketID]) REFERENCES [ServiceTicket]([ServiceticketID]), CONSTRAINT [FK_PartUsed.PartusedID] FOREIGN KEY ([PartID]) REFERENCES [Parts]([PartID]) );
CREATE TABLE [SalesInvoice] ( [InvoiceID] int identity(1,1), [Invoicenumber] varchar(30), [Date] varchar(30), [CarID] varchar(30), [CustomerID] int, [SalespersonID] int, PRIMARY KEY ([InvoiceID]), CONSTRAINT [FK_SalesInvoice.CustomerID] FOREIGN KEY ([CustomerID]) REFERENCES [Customer]([CustomerID]), CONSTRAINT [FK_SalesInvoice.CarID] FOREIGN KEY ([SalesPersonID]) REFERENCES [SalesPerson]([SalesPersonID]) );
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