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

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

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