Modern Database Management
13th Edition
ISBN: 9780134792293
Author: Hoffer
Publisher: PEARSON
expand_more
expand_more
format_list_bulleted
Question
Chapter 7, Problem 7.22PAE
Program Plan Intro
a. The balance that will be included for the customer after the last transaction was completed.
Program Plan Intro
b. Correct balance included for the customer after three transactions have been processed.
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
Database Systems
Each branch of the Jaja restaurant has a mainstay menu that is very popular with customers, so information on the availability of the number of servings is needed to be able to serve orders. Here are two transactions that are ordering a food menu at the same time.
T1: Start the transaction at time t1, read 10 servings of food stock at t2. Because ordering one portion, the stock is reduced by 1 at t3. On t6, update the stock count, and commit to t7.
T2: Transaction T2 starts a transaction on t2, reads the number of stocks in t3 as many as 10. At t4 orders 3 portions. On t5 it updates the stock to 7 and then on t6 commits it.
As a result of the T1 and T2 transactions above, there was an error in the amount of food stocks. Make a solution with 2PL. What kinds of problems happened? Give a reason why choosing this type of problem! How much food is still available?
In the problem below, x and y are local application program values Read( ) and Writel ) fetch and stored the
persistent values in a database. The database values are read / written by two different transactions. The time
sequence of these operations is shown in the table below. You cannot change the time sequence.
Take the initial values of x and y to be x = 4, y = 2.
a) In this nart the transactions are operating with isolation level READ UNCOMMITTED (no locks)
Time
Transaction 1
Transaction 2
Read(y)
y=y+5
2
Read(y)
y=y+ 10
3
4
Write(y)
Read(x)
7
Read(x)
8
X=x+ y:
Write(y)
Commit
9.
10
11
x=x+y
Write(y)
12
13
Commit
For the execution order shown above, what are the final values of x and y?
Answer: x=
b) There is a problem with the interleaved execution plan for these transactions.
What is the problem, i.e., which concurrency problem does this demonstrate?
Answer:
c) Rewrite the sequence of operations using the standard technique for dealing with concurrency
problems of this type for…
The following tables form part of a Library database held in an RDBMS:
Book (ISBN, title, edition, year)
BookCopy (copyNo, ISBN, available)
Borrower (borrowerNo, borrowerName, borrowerAddress)
BookLoan (copyNo, dateOut, dateDue, borrowerNo)
where:
Book contains details of book titles in the library and the ISBN is the key.
BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title.
Borrower contains details of library members who can borrow books and borrowerNo is the key.
BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower.
Formulate the following queries in relational algebra and tuple relational calculus:
5.27 List all copies of book titles that are available for borrowing.
5.28 List all copies of the book title “Lord of the Rings” that are available for…
Chapter 7 Solutions
Modern Database Management
Ch. 7 - Prob. 7.1RQCh. 7 - Prob. 7.2RQCh. 7 - Prob. 7.3RQCh. 7 - Prob. 7.4RQCh. 7 - Describe the advantages and disadvantages of...Ch. 7 - Describe the common components needed to create a...Ch. 7 - What are the six common steps needed to access...Ch. 7 - Prob. 7.8RQCh. 7 - Prob. 7.9RQCh. 7 - Prob. 7.10PAE
Ch. 7 - Prob. 7.11PAECh. 7 - Prob. 7.12PAECh. 7 - Prob. 7.13PAECh. 7 - Find some dynamic Web site code, such as that...Ch. 7 - Prob. 7.15PAECh. 7 - Prob. 7.16PAECh. 7 - Prob. 7.17PAECh. 7 - Consider the example code shown in Figure 7-10....Ch. 7 - Prob. 7.19PAECh. 7 - Prob. 7.20PAECh. 7 - Prob. 7.21PAECh. 7 - Prob. 7.22PAECh. 7 - Prob. 7.23PAECh. 7 - Prob. 7.24PAE
Knowledge Booster
Similar questions
- The following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where: Book contains details of book titles in the library and the ISBN is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower. Formulate the following queries in relational algebra and tuple relational calculus: a. List all book titles. b. List all borrower details. c.List all book titles published in the year 2012. d. List all copies of book titles that are…arrow_forwardThe following tables form part of a Library database held in an RDBMS: Book (ISBN, title, edition, year) BookCopy (copyNo, ISBN, available) Borrower (borrowerNo, borrowerName, borrowerAddress) BookLoan (copyNo, dateOut, dateDue, borrowerNo) where: Book contains details of book titles in the library and the ISBN is the key. BookCopy contains details of the individual copies of books in the library and copyNo is the key. ISBN is a foreign key identifying the book title. Borrower contains details of library members who can borrow books and borrowerNo is the key. BookLoan contains details of the book copies that are borrowed by library members and copyNo/dateOut forms the key. borrowerNo is a foreign key identifying the borrower. Formulate the following queries in relational algebra only. a. How many copies of ISBN “0-321-52306-7” are there? b. How many copies of ISBN “0-321-52306-7” are currently available c. How many times has the book title with ISBN…arrow_forward15 Suppose that Distributed Database System(DDB) has three sites; Sitel:Students table: 1000 rows, 10 Byte row size, Site2: Grades table: 2000 rows, 50 Byte row size, and Site3: Request a query with the result 100 rows, 30 bytes row size; What is the amount of data transfer in bytes after processing the following strategy(Transfer Student table and Grades table to site 3)7 Note: (insert only final result(number) without the equation) Enter your answerarrow_forward
- Perlarrow_forwardIMDB database that match those search criteria. Your program must include the following requirements: Connect to the same database server, using the same account as in the IMDB browser (the server is cisdbss.pcc.edu, and the username and password are 275student). Write a program that fetches data about a particular name from the NAMES database. Use the NAMES database on that server instead of the IMDB database, and modify your query. Here's an example query that should produce reasonable results: SELECT Name, Year, Gender, NameCount, Total FROM all_data WHERE Name = 'Marc' AND Gender = 'M' ORDER BY Year; Running the query should fetch the following data - only the first five rows are shown: Name Year Gender NameCount Total 1 Marc 1915 M 13 848603 2 Marc 1916 M 14 890099 3 Marc 1917 M 9 925511 4 Marc 1918 M 18 1013537 5 Marc 1919 M 17 980149 The user should be able to enter a name and a gender, and…arrow_forwardIn a relational database, a select operation reduces the size of a table by removing columns that meet certain requirements.Is it accurate or inaccurate?arrow_forward
- In a database, what happens if the referential integrity constraint is not maintained? Is it probable that any mistakes will be made?arrow_forwardAnswer the following prompts 1The InstantRide Management team founded a new team for car maintenance. The new team is responsible for the small maintenance operations for the cars in the InstantRide system. The main idea is to take actions faster and minimize the time spent for the maintenance. Therefore, the Car Maintenance team wants to store MAINTENANCE_TYPE_ID (char(5)) and a MAINTENANCE_TYPE_DESCRIPTION (varchar(30)) in the database. Using MAINTENANCE_TYPE_ID as the PRIMARY KEY, create a new table, MAINTENANCE_TYPES, and send the table description with the column names and types to the Car Maintenance team. 2The Car Maintenance team also wants to store the actual maintenance operations in the database. The team wants to start with a table to store CAR_ID (CHAR(5)), MAINTENANCE_TYPE_ID (CHAR(5)) and MAINTENANCE_DUE (DATE) date for the operation. Create a new table named MAINTENANCES. The PRIMARY_KEY should be the combination of the three fields. The CAR_ID and MAINTENANCE_TYPE_ID…arrow_forwardA File was sorted by key field, and then 10 records were stored in each block. Multi-level Indexing is made here, and 100 indexes are stored in each block. To find a specific record, the total number of block accesses is less than 4. Calculate the maximum number of records that make up this file.arrow_forward
- A manager has a list of items that have been sorted according to an item ID. Some of them are duplicates. She wants to add a code to the database that assigns a 1 to the item if it is unique, and if there are duplicates, assigns the number of the duplicate. An example is shown below. The first two items are unique, so the repeat code is 1. However, Item ID 37695 is listed six times, so the codes are assigned from 1 to 6, and so on. Explain how to assign the correct code using an IF statement Item ID Repeat Code35080 135222 137695 137695 237695 337695 437695 537695 637712 137722 137757 137757 2 In cell B2 enter 1, and then type a formula into cell B3, followed by dragging the formula down column B until it aligns with the last row in the Item ID column. Which of the following is the correct formula to type into cell B3?arrow_forwardOracle PL/SQL Implement a trigger to the following constraints: Meter readers can only read a maximum of 5 meters in any given calendar month. Customers who do not pay their bill within 60 days will their water supply cut off. Once a customer has had their supply cut off, the person or business responsible for the bill will not be able to create a new account at a different service address until such time as their arrears have been cleared.arrow_forwardAssume you have a database table with 10,000 records and you want to retrieve all records that satisfy a certain condition using a binary search algorithm. On average, how many comparisons would be needed to retrieve all the records?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education