Here is a small database for a Computer Store. It contains two tables Manufactur
ID: 3698590 • Letter: H
Question
Here is a small database for a Computer Store. It contains two tables
Manufacturers
Code (Artificial Primary Key)
Name (a String/Text)
Products
Code (Artificial Primary Key)
Name (a String/Text)
Price (a Real/Floating Point)
Manufacturer (Foreign Key into the Manufacturers table)
A. Create a .sql file with the schema for MySQL - you can pick the DB name to your liking!
B. Create Queries
Select the names of all the products in the store.
Select all the products with a price between $60 and $120.
Select all the products from Manufacturer "Hitchimura"
Select all the products from Manufacturer "Hitchimura" costing less than 200
Place these queries into the .sql file, place it into a zip archive and drop it into the dropbox.
Manufacturers Products Code (PK) Name Price Manufacturer (FK) integer integer text real Code (PK) integer Name textExplanation / Answer
B-
SQL Queries:
1-Select the names of all the products in the store.
Select * from Products;
2-Select all the products with a price between $60 and $120.
Select * From Products where Price>=60 AND Price<=120;
3-Select all the products from Manufacturer "Hitchimura"
SELECT * FROM PRODUCTS LEFT JOIN Manufacturers ON Products.Manufacturer=Manufacturers.Code WHERE Manufacturers.Name="Hitchimura";
4-Select all the products from Manufacturer "Hitchimura" costing less than 200
SELECT * FROM PRODUCTS LEFT JOIN Manufacturers ON Products.Manufacturer=Manufacturers.Code WHERE Manufacturers.Name="Hitchimura" AND Products.Price<200;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.