Question

CS 203 Discrete Structure 2 Create a Microsoft Access Database consisting of the following two tables:...

CS 203 Discrete Structure 2

Create a Microsoft Access Database consisting of the following two tables: Part_needs and Parts_Inventory

Can you provide the database and query on Microsoft access?

Part_needs

Supplier

Part_number

Project

23

1092

1

23

1101

3

23

9048

4

31

4975

3

31

3477

2

32

6984

4

32

9191

2

33

1001

1

Parts_Inventory

Part_number

Project

Quantity

Color_code

1001

1

14

8

1092

1

2

2

1101

3

1

1

3477

2

25

2

4975

3

6

2

6984

4

10

1

9048

4

12

2

9191

2

80

4

Answer the following questions:

  1. What are the operations that correspond to the query expressed using this SQL statement?

SELECT Supplier

FROM Part_needs

WHERE 1000<= Part_number <= 5000

  1. What is the result of the corresponding query, created using Access Database given Part_needs table as input?

  2. What are the operations that correspond to the query expressed using this SQL statement?

SELECT Supplier, Project                                                                                                                                

FROM Part_needs, Parts_inventory

WHERE Quantity <= 10

  1. What is the output of the corresponding query created ,using Microsoft Access Database t given Part_needs, and Parts_inventory

Homework Answers

Answer #1

Please find below answer for above 2 queries and Don't forget to give a Like.

1) Operations used for this query is SELECT, FROM, WHERE

Result of query 1:

Supplier Project
23 1
23 3
31 3
31 2
33 1

2)Operations used for this query is SELECT, FROM, WHERE

Result of query 2:

ambiguous column name: project

Since we are selecting project from 2 tables. And these 2 tables have column named project. So, we need to use objects.

Use below query to get the result.

select pn.suplier, pn.project from part_needs pn, parts_inventory pi

where quantity <=10;

we created two object pn and pi for two tables. We need to select from which table the project details should be displayed.

Thank you.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Assignment 2 Instructions You need to access to the database and write SQL queries on the...
Assignment 2 Instructions You need to access to the database and write SQL queries on the following site: https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in 1. Use INNER JOIN to create a report. In this report, list each customer’s CustomerID, CustomerName, and their each OrderID and each order’s OrderDate, if the customer has ever placed an order. You should use the Customers table and the Orders table in the database to complete this query.   2. Use INNER JOIN to create a report. In this report, list...
Garden Glory Project Questions Assume that Garden Glory designs a database with the following tables: OWNER...
Garden Glory Project Questions Assume that Garden Glory designs a database with the following tables: OWNER (OwnerID, OwnerName, OwnerEmail, OwnerType) OWNED_PROPERTY (PropertyID, PropertyName, PropertyType, Street, City, State, Zip, OwnerID) GG_SERVICE (ServiceID, ServiceDescription, CostPerHour); EMPLOYEE (EmployeeID, LastName, FirstName, CellPhone, ExperienceLevel) PROPERTY_SERVICE ( PropertyServiceID , PropertyID , ServiceID, ServiceDate , EmployeeID, HoursWorked) The referential integrity constraints are: OwnerID in OWNED_PROPERTY must exist in OwnerID in OWNER PropertyID in PROPERTY_SERVICE must exist in PropertyID in OWNED_PROPERTY ServiceID in PROPERTY_SERVICE must exist in ServiceID...
Convert the Ch01_SalesSummary file to a database table in MS Access (steps: drop unnecessary titles row...
Convert the Ch01_SalesSummary file to a database table in MS Access (steps: drop unnecessary titles row and import data into Access using “External Data” Excel tab in Access). Sort the new Access database table in ascending order by any one column. Table Waitstaff Member# #Guests Hour Food Beverage Total 29 WH 0 1 8 0 4 5 28 MM 101 4 8 0 4 5 28 MM 0 2 8 5 8 15 5 LR 0 2 8 5 9...
Complete a Java program named ARMgr that maintains customer accounts receivable in a database. The code...
Complete a Java program named ARMgr that maintains customer accounts receivable in a database. The code to initialize the CustomerAccountsDB database table and add a set of customer accounts is provided. Finish the code in these 3 methods in CustomerAccountDB.java to update or query the database: -purchase(double amountOfPurchase) -payment(double amountOfPayment) -getCustomerName() Hint: For getCustomerName(), look at the getAccountBalance() method to see an example of querying data from the database. For the purchase() and payment() methods, look at the addCustomerAccount() method...
SQL DATABASE Task 4 [1.5 marks] Create Index (0.5 marks) Currently, the database only contains a...
SQL DATABASE Task 4 [1.5 marks] Create Index (0.5 marks) Currently, the database only contains a small number of records. However, the data contained within it is expected to grow significantly in the future. Creating indexes on commonly searched columns is a way performance issues can be minimized. Write a command to create an index on student_name column of the student table. Create view – 1 mark Write a command to create a view to list the student ID and...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment 4’s schema (Customer-Invoice-Line-Product-Vendor). Make sure that your SQL script runs without any errors. Submit your answers in a .SQL file. 1 (2 Points) - Find the count of distinctvendors thatsupplied products that are priced lowerthan 185? 2 (2 Points) - For each vendor, find their product that has the lowest product quantity. Your output should include vendor code, vendor name, product description and product...
Describe what the following query does using lyrics database with mysql. lyrics database is posted below...
Describe what the following query does using lyrics database with mysql. lyrics database is posted below 1.) select m.lastname, m.firstname, s.lastname from members m inner join salespeople s using (salesID) order by m.lastname asc; 2.) select studioID, studioname, base from salespeople sa inner join studios st on (sa.salesID = st.salesid) where base < 300 3.) SELECT artistName FROM Artists WHERE artistID IN (SELECT artistID FROM Titles) DROP TABLES IF EXISTS Artists,Genre, Members, Titles, Tracks,SalesPeople,Studios,XrefArtistsMembers; DROP TABLES IF EXISTS Authors,Publishers,Titles,Title_Authors,Royalties; DROP...
** Note ** Execute the following query before completing steps 1 and 2: INSERT INTO Employees...
** Note ** Execute the following query before completing steps 1 and 2: INSERT INTO Employees (LastName, FirstName, BirthDate, Notes) VALUES ('Smith','Mary','1980-10-15','John is a student at Nashville State.'); 1. Using the record you just created in the Note above, write a query to update the LastName field to Jones. 2. Using the record you just created in the Note above, write a query to delete that record. 3. Write a query using the Products table that will return the sum...
HASBRO DEVELOPS A GLOBAL SYSTEMS STRATEGY If you’ve ever played in a sandbox with a Tonka...
HASBRO DEVELOPS A GLOBAL SYSTEMS STRATEGY If you’ve ever played in a sandbox with a Tonka dump truck, accessorized a My Little Pony, manipulated a Transformer, or engaged in mock combat with a G.I. Joe, you have experienced a piece of the Hasbro Inc. juggernaut. Begun by brothers Henry, Hilal, and Herman Hassenfeld in 1923 as a pencil box and school supplies company, Hasbro transitioned to toys in the 1940s. Acquisitions, including Milton Bradley, Tonka, and Wizards of the Coast...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary...
Please answer the following Case analysis questions 1-How is New Balance performing compared to its primary rivals? How will the acquisition of Reebok by Adidas impact the structure of the athletic shoe industry? Is this likely to be favorable or unfavorable for New Balance? 2- What issues does New Balance management need to address? 3-What recommendations would you make to New Balance Management? What does New Balance need to do to continue to be successful? Should management continue to invest...