Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Database Technology Edbt 88 International Conference On Extending Database Technology Venice Italy March 14 18 1988 Proceedings Lncs 303

Authors: Joachim W. Schmidt ,Stefano Ceri ,Michele Missikoff

1988th Edition

3540190740, 978-3540190745

More Books

Students also viewed these Databases questions

Question

Organize and support your main points

Answered: 1 week ago

Question

Move smoothly from point to point

Answered: 1 week ago

Question

Outlining Your Speech?

Answered: 1 week ago