100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

WGU C170 Code to create and populate the Premiere Products Database.

Rating
-
Sold
-
Pages
5
Grade
A+
Uploaded on
10-02-2022
Written in
2021/2022

WGU C170 Code to create and populate the Premiere Products Database.

Institution
Course









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Course

Document information

Uploaded on
February 10, 2022
Number of pages
5
Written in
2021/2022
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

https://www.stuvia.com/
https://www.stuvia.com
https://www.stuvia.com/




Code to create and populate the Premiere Products Database
Create a database called Premiere Products and then create the following tables:

CREATE TABLE Rep
(

rep_num INT(5) NOT NULL,
last_name VARCHAR(30) NOT NULL,
first_name VARCHAR(20) NOT NULL,
street VARCHAR(20) NOT NULL,
city VARCHAR(20) NOT NULL,
state CHAR(2) NOT NULL,
zip VARCHAR(5) NOT NULL,
commission FLOAT NOT NULL,
rate FLOAT NOT NULL,
PRIMARY KEY (rep_num)

);

CREATE TABLE Customer
(
customer_num INT(5) NOT NULL,
customer_name VARCHAR(30) NOT NULL,
street VARCHAR(20) NOT NULL,
city VARCHAR(20) NOT NULL,
state CHAR(2) NOT NULL,
zip VARCHAR(5) NOT NULL,
balance FLOAT NOT NULL,
credit_limit FLOAT NOT NULL,
rep_num INT(5) NOT NULL,
PRIMARY KEY (customer_num),
FOREIGN KEY (rep_num) REFERENCES Rep (rep_num)

);

CREATE TABLE Orders
(
order_num INT(10) NOT NULL,
order_date DATE NOT NULL,
customer_num INT (5) NOT NULL,
PRIMARY KEY (order_num),
FOREIGN KEY (customer_num) REFERENCES Customer (customer_num)

Nitro Software, Inc.
100
This study source was downloaded by 100000818837220 from PortableonDocument
CourseHero.com Lane
02-05-2022 15:21:27 GMT -06:00

Wonderland
https://www.coursehero.com/file/100084992/Code-to-create-and-populate-the-Premiere-Products-Databasedocx/

,https://www.stuvia.com/
https://www.stuvia.com
https://www.stuvia.com/




);

CREATE TABLE Part
(
part_num VARCHAR(10) NOT NULL,
description VARCHAR(20) NOT NULL,
on_hand INT (5) NOT NULL,
class VARCHAR(3) NOT NULL,
warehouse VARCHAR(3) NOT NULL,
price FLOAT NOT NULL,
PRIMARY KEY (part_num)

);

CREATE TABLE Order_line
(
order_num INT(10) NOT NULL,
part_num VARCHAR(10) NOT NULL,
num_ordered INT(3) NOT NULL,
quoted_price FLOAT NOT NULL,
PRIMARY KEY (order_num, part_num)

);

Enter this sample data into the tables:

Rep

INSERT into Rep VALUES(20,"Kaiser", "Valerie", "624 Randall", "Grove", "FL", "33321", 20542.50,
.05);

INSERT into Rep VALUES(35,"Hall", "Richard", "532 Jackson", "Sheldon", "FL", "33553", 39216, .
07);

INSERT into Rep VALUES(65,"Perez", "Juan", "1626 Taylor", "Fillmore", "FL", "33336", 23487.05, .
05);

Customer

INSERT into Customer VALUES(148,"Al's Appliance and Sport", "2837 Greenway", "Fillmore",
"FL", "33336", 6550.00, 7500.00, 20);

INSERT into Customer VALUES(282,"Brookings Direct", "3827 Devon", "Grove", "FL", "33321",
431.50, 10000.00, 35);

Nitro Software, Inc.
100
This study source was downloaded by 100000818837220 from PortableonDocument
CourseHero.com Lane
02-05-2022 15:21:27 GMT -06:00

Wonderland
https://www.coursehero.com/file/100084992/Code-to-create-and-populate-the-Premiere-Products-Databasedocx/

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Lectfayh Arizona Medical Training Institute
Follow You need to be logged in order to follow users or courses
Sold
107
Member since
4 year
Number of followers
98
Documents
303
Last sold
10 months ago

3.7

15 reviews

5
8
4
1
3
3
2
0
1
3

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions