Reference no: EM13948372
Using the script file below to create an E-R diagram of the entities, attributes and relationship.
# use the "my_database" database
USE my_database;
# create a table called "items" with 3 records
CREATE TABLE IF NOT EXISTS items
(
id INT PRIMARY KEY,
vendor INT NOT NULL,
name CHAR(20) NOT NULL,
price DECIMAL(6,2) NOT NULL
);
INSERT INTO items (id, vendor, name, price)
VALUES (601, 2, "Elephants", 147.50);
INSERT INTO items (id, vendor, name, price)
VALUES (602, 2, "Reindeers", 123.00);
INSERT INTO items (id, vendor, name, price)
VALUES (603, 1, "Alligators", 185.00);
# create a table called "vendors" with 2 records
CREATE TABLE IF NOT EXISTS vendors
(
id INT PRIMARY KEY,
name CHAR(20) NOT NULL
);
INSERT INTO vendors (id, name) VALUES (1, "Alpha Inc");
INSERT INTO vendors (id, name) VALUES (2, "Zeta Inc");
# create a table called "orders" with 3 records
CREATE TABLE IF NOT EXISTS orders
(
num INT PRIMARY KEY,
item INT NOT NULL,
qty INT NOT NULL
);
INSERT INTO orders (num, item, qty) VALUES (2805, 603, 10);
INSERT INTO orders (num, item, qty) VALUES (2806, 603, 5);
INSERT INTO orders (num, item, qty) VALUES (2807, 601, 10);
# display order number, quantity, item name, vendor
# and total order value of order number 2805
SELECT orders.num AS Number,
orders.qty AS Qty,
items.name AS Toy,
vendors.name AS Vendor,
items.price * orders.qty AS Total
FROM items, vendors, orders
WHERE vendors.id = items.vendor
AND items.id = orders.item
AND orders.num = 2805;
# delete these sample tables
DROP TABLE IF EXISTS items;
DROP TABLE IF EXISTS vendors;
DROP TABLE IF EXISTS orders;
Attachment:- ER.doc
Complete a job requirements job analysis
: Complete a job requirements job analysis on a position with which you are familiar. Focus on the specifics tasks of the associated KSAOs that lead to success in meeting the tasks. (showing detail both in the tasks and the KSAOs type, proficiency, et..
|
Create table command, and modify it to create a new table
: Start with this CREATE TABLE command, and modify it to create a new range_partitioned table named CH07EMPLOYEE_RANGE that contains the same column as the employee table.
|
Business requirements and design requirements
: Why is it important to use modular approach for designing Networks? Could you anticipate what problems can occur if such methods are not used? Describe your response in two paragraphs.
|
Calculate design effect for the mean of that key variable
: A medical practice has record for N=900 patients. A simple random sample of n=300 was selected, and 210 of the sample patients had private health insurance. Estimate the percentage of patients with private health insurance and the standard error of..
|
Create an e-r diagram of entities, attributes & relationship
: Using the script file below to create an E-R diagram of the entities, attributes and relationship.
|
What should yahoo do about the situation in laffaire yahoo
: In your opinion, what should Yahoo do about the situation in L'Affaire Yahoo? Should it make concessions to the French government
|
Calculate the margin and turnover ratios for last year
: Seere Company provided the following income statement for last year. Compute average operating assets. Compute the margin and turnover ratios for last year. Compute ROI.
|
How world you compare with nike
: What are the pros, cons and risks associated with Nike's core marketing strategy? If you were Adidas, how world you compare with Nike
|
Practical vs theoretical education in health professionals
: Issue in health professions education, review the literature pertaining to the issue, analyze the issue, and discuss its effect on health professions education. In writing 8-10 Pages font size 12 double space, including refrances APA style.
|