Question

In: Computer Science

You have been asked by the owner of a pre-owned car dealership to set up a...

You have been asked by the owner of a pre-owned car dealership to set up a way to track the cars in his inventory. He often needs to search his records for specific makes and models or cars made in certain years. He also wants to be able to generate reports based on his sales and reports on which sales representatives are doing the most business

1.Create a new a table named SALES_REP. Be sure to create attributes, set a primary key, select data types, and add data. Use the following information:

Rep Number

Last Name

First Name

Address

City

State

ZIP

Phone

1

Perry

Jim

3453 E. State

Jacksonville

FL

32231

904-555-4353

2

Bauer

Evan

5347 W. Grand

Jacksonville

FL

32232

904-555-3423

3

Dickens

Billy

2351 S. Ferguson

Jacksonville

FL

32232

904-555-5632

  1. Create a table named INVENTORY and add data. Use the data shown below, with the following guidelines:

  1. Add a column inventoryid as surrogate key and create primary key on that column. Set up an auto number to use for a primary key (auto_increment).
  2. Create check constraint on carcondition column for list of values = Excellent, Good, Fair, and Poor.

  1. Create a one-to-many relationship between SALES_REP and INVENTORY using RepNumber. Create referential integrity on INVENTORY table on RepNumber column to reference SALES_REP on RepNumber.

Solutions

Expert Solution

>First we create SALES_REP TABLE so in that projectmanagment_db is schema name

CREATE TABLE `projectmanagment_db`.`sales_rep` (
`Rep Number` INT NOT NULL AUTO_INCREMENT,
`Last Name` VARCHAR(45) NULL,
`First Name` VARCHAR(45) NULL,
`Address` VARCHAR(45) NULL,
`City` VARCHAR(45) NULL,
`ZIP` INT NULL,
`Phone` BIGINT(20) NULL,
PRIMARY KEY (`Rep Number`));

> I forget State column so in that case i add state column

ALTER TABLE `projectmanagment_db`.`sales_rep`
ADD COLUMN `State` VARCHAR(45) NULL AFTER `Phone`;

> So here i create INVENTORY table with apply check constraint for car condition column and apply the forgien key referential integrity column

CREATE TABLE `projectmanagment_db`.`inventory` (
`inventoryid` INT NOT NULL AUTO_INCREMENT,
`carcondition` VARCHAR(45) NULL,
`referential integrity` INT NULL,CHECK(Car Condition in ('Excellent','Good','Fair','Poor')),
PRIMARY KEY (`inventoryid`),
INDEX `RepNumber_idx` (`referential integrity` ASC) VISIBLE,
CONSTRAINT `RepNumber`
FOREIGN KEY (`referential integrity`)
REFERENCES `projectmanagment_db`.`sales_rep` (`Rep Number`)
ON DELETE NO ACTION
ON UPDATE NO ACTION);

> Adding record into first table SALES_REP

INSERT INTO `projectmanagment_db`.`sales_rep` (`Last Name`, `First Name`, `Address`, `City`, `State`, `ZIP`, `Phone`) VALUES ('Perry', 'Jim', '3453 E. State', 'Jacksonville', 'FL', '32231', '9045554353');

INSERT INTO `projectmanagment_db`.`sales_rep` (`Last Name`, `First Name`, `Address`, `City`, `State`, `ZIP`, `Phone`) VALUES ('Bauer', 'Evan', '5347 W. Grand', 'Jacksonville', 'FL', '32232', '9045555632');

INSERT INTO `projectmanagment_db`.`sales_rep` (`Last Name`, `First Name`, `Address`, `City`, `State`, `ZIP`, `Phone`) VALUES ('Dickens', 'Billy', '2351 S.Ferguson', 'Jacksonville', 'FL', '32232', '9045555632');


Related Solutions

You have been hired by a used-car dealership to modify the price of cars that are...
You have been hired by a used-car dealership to modify the price of cars that are up for sale. You will get the information about a car, and then change its price tag depending on a number of factors. Write a program (a script named: 'used_cars.m' and a function named 'car_adjust.m').The script passes the file name 'cars.dat' to the function. The following information is stored inside the file: Ford, 2010 with 40,000 miles and no accident at marked price of...
You are a cost management consultant and you have been asked by a small business owner...
You are a cost management consultant and you have been asked by a small business owner for business advice. Your client owns a chain of small, local operations that support larger caterers for special events. Your client provides the tents for outside events, the soft drinks and snacks for the children of events, along with floral and other decorative arrangements. This kind of business is extremely competitive and your client would like to know how far she can lower her...
You are a cost management consultant and you have been asked by a small business owner...
You are a cost management consultant and you have been asked by a small business owner for business advice. Your client owns a chain of small, local operations that support larger caterers for special events. Your client provides the tents for outside events, the soft drinks and snacks for the children of events, along with floral and other decorative arrangements. This kind of business is extremely competitive and your client would like to know how far she can lower her...
You are a cost management consultant and you have been asked by a small business owner...
You are a cost management consultant and you have been asked by a small business owner for business advice. Your client owns a chain of small, local operations that support larger caterers for special events. Your client provides the tents for outside events, the soft drinks and snacks for the children of events, along with floral and other decorative arrangements. This kind of business is extremely competitive and your client would like to know how far she can lower her...
You have been asked by the owner of your company to advise her on the process...
You have been asked by the owner of your company to advise her on the process of purchasing some expensive long-term equipment for your company. Give a discussion of the different methods she might use to make this capital investment decision. payback method, etc. Explain each method and its strengths and weaknesses. Indicate which method you would prefer to use and why.
You have been hired as an IT expert by a small firm to set up an...
You have been hired as an IT expert by a small firm to set up an office for 20 staff members, half of whom will work with desktop computers and the remaining with laptop computers using wireless networks. The office would use one networked laser printer, accessible from both the desktop and laptop computers. The desktop computers will use a wired network, while the laptop computers will employ a wireless network to print and access the internet. Start making a...
The owner of a new car dealership claims the average number of days it takes his...
The owner of a new car dealership claims the average number of days it takes his dealership to sell a Chevrolet Aveo is 50 days. A random sample of 50 cars had a mean time on the dealer’s lot of 64 days. Assume the population standard deviation to be 7.0 days. Find the 95% confidence interval estimate of the population mean. State the Margin of Error, Best Point Estimate and Include the written statement Please list all the work.
You have been asked to value Delta Corp and have come up with the following inputs:...
You have been asked to value Delta Corp and have come up with the following inputs: Delta 2019 Revenues $1,500 COGS (w/o Depreciation) as % of Revenue 50% Depreciation $40.00 Tax Rate 35.00% Capital Expenditure $60.00 Working Capital (as % of Revenue) 30.00% Beta during the high growth period 1.50 Expected Growth Rate in Revenues &EBIT during the high growth period 30.00% Expected Period of High Growth 3 years Growth rate After High-Growth Period 5.00% Beta After High-Growth Period 1.20...
The owner of a local car dealership has just received a call from a regional distributor...
The owner of a local car dealership has just received a call from a regional distributor stating that a $5000 bonus will be awarded if the owner's dealership sells at least 10 new cars next Saturday. On an average Saturday, this dealership has 75 potential customers look at new cars, but there is no way to determine exactly how many customers will come this particular Saturday. The owner is fairly certain that the number would not be less than 40,...
You have been assigned to set up a LAN for your office. a.Discuss the role and...
You have been assigned to set up a LAN for your office. a.Discuss the role and importance of communications media as part of this setup [2 marks] b.Identify two(2) types of communications media, clearly indicating your preference to create this LAN. Justify your preference.[4marks] 2.The use of social media as a tool for communication is on a rise in society today. As it relates to education, discuss: a.Two (2) possible benefits to studentsof using social media[4 marks] b.Two (2)challenges of...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT