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

  Define responsibility for database administration

Write a paper discussing what professional organizations you might join, and websites you might visit, that would provide insight into a career that includes responsibility for database administration

  Discuss social engineering techniques

Discuss how the information gathered during your footprinting analysis could be used to initiate an attack against the organization. Discuss social engineering techniques that could be utilized to gather information regarding the organization's com..

  Describe the main capabilities of mysql

describe the main capabilities of MySQL.

  Types of keys used in relational database

Explain with examples different types of keys used in relational database, how they help relating different tables.

  Imagine that you have been hired as the database

imagine that you have been hired as the database administrator for a local department store. the department store has

  Which is not a factor to consider in software evaluation

Peer reviewers are the key participants in which activity?

  Write a set of action queries coded as a transaction to move

Write a set of action queries coded as a transaction to move rows from the Invoices table to the InvoiceArchive table. Insert all paid invoices from Invoices into InvoiceArchive, but only if the invoice doesn't already exist in the InvoiceArchive ..

  Erp software and service industryoriginally the sap erp

erp software and service industryoriginally the sap erp software was developed for and implemented by mostly

  Choose a suitable indicator to plot the measure

Determine how you will collect the data elements needed for this measure (i.e. how will you collect the data elements needed to calculate the measure). Describe what those data elements are, and how they will be collected.

  Show that the fundamental two-phase locking protocol

for each of these you have to give a convincing argument as to why the stated claim is true. it is not enough just to

  Show the database development processes

Assume you were a newly hired IT Security Manager at a software development company that in the past hasn't paid much attention to security, especially in its database development processes.

  Thread risk analysis and modeling process

Determine the threats and countermeasures for system components and determine the Threat Risks - Decompose the application. Create high level diagrams of system components

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