How many database requests can you identify for an inventory

Assignment Help Database Management System
Reference no: EM131113884

Questions 1 -5 refer to the following scenario.

Suppose you are a manufacturer of product XYZ, which is composed of parts X, Y, and Z. Each time a new product is created, it must be added to the product inventory, using the PROD_QOH in a table named PRODUCT. And each time the product XYZ is created, the parts inventory, using PART_QOH in a table named PART, must be reduced by one each of parts X, Y, and Z. The sample database contents are shown below:

The Database for Problem 1-5

Table name: PRODUCT              Table name: PART

PROD_CODE

PROD_QOH

 

PART_CODE

PART_QOH

XYZ

950

 

X

395

 

 

 

Y

390

 

 

 

Z

405

Given that information, answer Questions 1 through 5.

1. How many database requests can you identify for an inventory update for both PRODUCT and PART?

2. Using SQL, write each database request you identified in problem 1.

3. Write the complete transaction(s).

4. Write the transaction log, using tables below, as your template.

We assume that product ‘XYZ' has a PROD_QOH = 950 at the start of the transaction and that the transaction is representing the addition of 1 new product. We also assume that PART components "X", "Y" and "Z" have a PROD_QOH equal to 395, 390, and 405 respectively.

TRL ID

TRX NUM

PREV PTR

NEXT PTR

OPERATION

TABLE

ROW ID

ATTRIBUTE

BEFORE VALUE

AFTER VALUE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

5. Using the transaction log you created in Step 4, trace its use in database recovery.

6. Describe the three most common concurrent transaction execution problems. Explain how concurrency control can be used to avoid those problems.

Questions 7 -10 refer the following scenario as represented in the CGS2541 Project 9 ABC.mdb Access Database. The relational diagram shown below represents the main entities for ABC's database. Note the following important characteristics:

• A customer may make many purchases, each one represented by an invoice.

- The CUS_BALANCE is updated with each credit purchase or payment and represents the amount the customer owes.
- The CUS_BALANCE is increased (+) with every credit purchase and decreased (-) with every customer payment.
- The date of last purchase is updated with each new purchase made by the customer.
- The date of last payment is updated with each new payment made by the customer.

• An invoice represents a product purchase by a customer.

- An INVOICE can have many invoice LINEs, one for each product purchased.
- The INV_TOTAL represents the total cost of invoice including taxes.
- The INV_TERMS can be "30," "60," or "90" (representing the number of days of credit) or "CASH," "CHECK," or "CC."
- The invoice status can be "OPEN," "PAID," or "CANCEL."

• A product's quantity on hand (P_QTYOH) is updated (decreased) with each product sale.
• A customer may make many payments. The payment type (PMT_TYPE) can be one of the following:

- "CASH" for cash payments.
- "CHECK" for check payments
- "CC" for credit card payments

• The payment details (PMT_DETAILS) are used to record data about check or credit card payments:

- The bank, account number, and check number for check payments
- The issuer, credit card number, and expiration date for credit card payments.

Note: Not all entities and attributes are represented in this example. Use only the attributes indicated.

FIGURE P10.6 The ABC Markets Relational Diagram

2403_The ABC Markets Relational Diagram.jpg

7. Using this database, write the SQL code to represent the following transaction. Use BEGIN TRANSACTION and COMMIT to group the SQL statements in logical transactions.On March 28, 2016, customer ‘80200' makes a credit purchase (30 days) of one unit of product ‘1546-QQ2' with a unit price of $30.00; the tax rate is 8 percent. The invoice number is 9910, and this invoice has only one product line.

8. Create a simple transaction log, in the table below, to represent the actions of the previous transaction in #7.

TRL ID

TRX NUM

PREV PTR

NEXT PTR

OPERATION

TABLE

ROW ID

ATTRIBUTE

BEFORE VALUE

AFTER VALUE

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

9. Assuming that pessimistic locking is being used, but the two-phase locking protocol is not, create a chronological list of the locking, unlocking, and data manipulation activities that would occur during the complete processing of the transaction described in Problem 7.

Time

Action

1

 

2

 

3

 

4

 

5

 

6

 

7

 

8

 

9

 

10

 

11

 

12

 

Cust

10. Assuming that pessimistic locking with the two-phase locking protocol is being used, create a chronological list of the locking, unlocking, and data manipulation activities that would occur during the complete processing of the transaction described in Problem 7.

Time

Action

1

 

2

 

3

 

4

 

5

 

6

 

7

 

8

 

9

 

10

 

11

 

12

 

Reference no: EM131113884

Questions Cloud

Reasons that entrepreneurs may not actually obtain : What are some of the reasons that entrepreneurs may not actually obtain debt financing, though they might very much need it?
Arrangement of identical spheres : Calculate the percentage of unoccupied space in a close-packed arrangement of identical spheres.
Despite the dangers of overly diagnosing a certain category : Discuss why, despite the dangers of overly diagnosing a certain category, biosocial theories still show great promise in dealing with substance abuse problems and the development of prevention and treatment programs
Find the overall current drawn from the supply : Also sketch the power triangles before and after the addition of C, and find the overall current drawn from the supply.
How many database requests can you identify for an inventory : How many database requests can you identify for an inventory update for both PRODUCT and PART? Using SQL, write each database request you identified in problem 1. Write the transaction log, using tables below, as your template.
How do you communicate with superiors subordinates and peers : What communication skills do you use when you are working in a team? What communication skills do you use when you are dealing with a situation that is making you angry, for example, phone rage?
What is the structure of the nc court system like : What is the structure of the NC court system like? What is meant by the courtroom work group, who composes it and what are their jobs
Determine the kva rating of the autotransformer : determine the kVA rating of the autotransformer, the kVA transformed by transformer action, and the kVA conducted.
Determining the kinds of programing : There are definitely trends in what funders are seeking to fund. What kinds of programing do you think are currently at the top of the trend curve, and why?

Reviews

Write a Review

Database Management System Questions & Answers

  Explain about the data warehouses and relational databases

Can you explain about the Data Warehouses and relational databases?

  Metropolis toys metropolis toys is an independent

metropolis toys metropolis toys is an independent family-owned manufacturer of wooden toys. the toys are designed by

  Describe the different lobs that oracle supports

Describe the different LOBs that Oracle supports. What are they used for? How can they be stored in the database

  Determine cost of least expensive part in part table

Write a query to determine the cost of the least expensive part in the part table? Format the returned price in dollars and cents using the correct function.

  Write names and e-mail addresses from database

Suppose a database has tables given below. Write the names and e-mail addresses for all customers who have had stove repair which cost more than $50.

  Write an sql script

FOR QUESTIONS 1-10: Given the following table named DEPT, Write an SQL script for the following returned data

  Writing an application in assembly language

Suppose we have TEGRA, a multi-core mobile processor. While writing an application in assembly language for the given device, we have two options regarding code optimization.

  Use the information and build context data flow diagram

The purpose of the sales and book tracking system is to provide a single central repository of all information about sales leads, books in process, and books for sale. The Sales Department will enter new authors to the system as they gather leads ..

  Draw erd with key attributes and data dictionary

Draw ERD with key attributes. You can use any notation to draw the ERD. Must include legend - Data dictionary for the above scenario

  Create a context level dfd

Create a context level DFD. You should take your DFD to your tutorial for feedback before starting on the ER.

  What makes up a database system

When would you use a relational database model?

  What is the purpose of performing a feasibility assessment

How Technology Can Ease Supply Chain Management and Mitigate Risk - What is the purpose of performing a feasibility assessment

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd