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...
Assignment 7 This is a two-part assignment. Students will create and submit 3 scripts. Here are...
Assignment 7 This is a two-part assignment. Students will create and submit 3 scripts. Here are the instructions: Before You need to Import the books_sc database via phpMyAdmin Script 1 Create a php file to connect to the books_sc database. You can name this file connect.php. This separate file will be ‘included’ in the other scripts, script 2 and script 2 Script 2 (25 points – to receive these points, you need to have the connect.php file created and submitted)...
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...
A. Create a PowerShell script named “restore.ps1” within the “Requirements2” folder. For the first line, create...
A. Create a PowerShell script named “restore.ps1” within the “Requirements2” folder. For the first line, create a comment and include your first and last name along with your student ID. Note: The remainder of this task shall be completed within the same script file, “restore.ps1.” B. Write a single script within the “restore.ps1” file that performs all of the following functions without user interaction: 1. Create an Active Directory organizational unit (OU) named “finance.” 2. Import the financePersonnel.csv file (found...
Use the Donor database attached to the assignment answer the following: Question 1: Create a block...
Use the Donor database attached to the assignment answer the following: Question 1: Create a block to retrieve and display pledge and payment information for a specific donor. For each pledge payment from the donor, display the pledge ID, pledge amount, number of monthly payments, payment date, and payment amount. The list should be sorted by pledge ID and then by payment date. For the first payment made for each pledge, display “first payment” on that output row. 2 marks...
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...
-- Drop the tables if they existDROP TABLE REP CASCADE CONSTRAINTS;DROP TABLE CUSTOMER CASCADE CONSTRAINTS;DROP TABLE...
-- Drop the tables if they existDROP TABLE REP CASCADE CONSTRAINTS;DROP TABLE CUSTOMER CASCADE CONSTRAINTS;DROP TABLE ORDERS CASCADE CONSTRAINTS;DROP TABLE ITEM CASCADE CONSTRAINTS;DROP TABLE ORDER_LINE CASCADE CONSTRAINTS;-- You are to change CUSTOMER to CUSTOMERS for the Colonial database to avoid conflict with the CUSTOMER table in Tal.-- Create the tablesCREATE TABLE REP(REP_NUM CHAR(2) PRIMARY KEY,LAST_NAME CHAR(15),FIRST_NAME CHAR(15),STREET CHAR(15),CITY CHAR(15),STATE CHAR(2),POSTAL_CODE CHAR(5),COMMISSION DECIMAL(7,2),RATE DECIMAL(3,2) );CREATE TABLE CUSTOMER(CUSTOMER_NUM CHAR(3) PRIMARY KEY,CUSTOMER_NAME CHAR(35) NOT NULL,STREET CHAR(20),CITY CHAR(15),STATE CHAR(2),POSTAL_CODE CHAR(5),BALANCE DECIMAL(8,2),CREDIT_LIMIT DECIMAL(8,2),REP_NUM CHAR(2) );CREATE...
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...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT