Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Output for the database admin during the execution of the transaction: Query executed successfully. Output for the database admin after the execution of the transaction:
Output for the database admin during the execution of the transaction: Query executed successfully. Output for the database admin after the execution of the transaction: (3) Query executed successtuly. On the same day, the database administrator creates a new transaction again by adding up a P1000 balance to all rows in the Accounts table. This time, he wants his transaction to obtain an exclusive lock. While the database administrator is working with his transaction, a sophisticated user named Joe wants to add a new entry: T_ID: 7, Name: Natasha, Balance: P9,000. Using SERIALIZABLE command, write queries that will demonstrate these two (2) concurrent transactions. (Note: You can use while loop in order to update all the rows with a specific value.) Mr. and Mrs. Stark share an access to an account named Stark. On August 21, 2020 Mr. Stark wants to withdraw an amount of P1,000 to his account. While Mr. Stark is working on his transaction, Mrs. Stark start a new transaction that will view the balance of their account. She sees the balance as P14,000. Stark on the other hand, did not confirm his transaction and the system automatically aborted his requested transaction. Using READ UNCOMMITTED, write queries that will demonstrate this concurrent transaction. Output for Mr. Stark's transaction: Output for Mrs. Stark's transaction: On August 28, 2020, the database administrator creates a new transaction on the Accounts table. Still, he wants to obtain a lock that will prevent any other transaction from modifying any rows from it while he was working with his transaction. But he wants other transactions to be able to insert new entries. Meanwhile, an application programmer inserts a new entry in Accounts table: TID: 6, Name: Clint, Balance: P19,000. At the same time, a sophisticated user wants to modify the balance of Thor by deducting a P500. Using the REPEATABLE READ command, write queries that will demonstrate these three (3) concurrent transaction. Output for database admin starting the transaction: Output for the database administrator: Output for Joe: Query executed successfully. Query executed successfully. Srocedures: 1. Create a database named ConcurrencyControl and create a two (2) tables named Accounts and Transac_History and put the following data. Table 2. Transac_History Note: To understand the data from the Transac_History table clearly, a negative amount means the transaction for that entry deducts the specified amount in the corresponding Account ID or A_ID. A/so, if the two (2) entries have the same T1D, it means that they have a transaction between them where they transfer their funds. Output for the database admin during the execution of the transaction: Query executed successfully. Output for the database admin after the execution of the transaction: (3) Query executed successtuly. On the same day, the database administrator creates a new transaction again by adding up a P1000 balance to all rows in the Accounts table. This time, he wants his transaction to obtain an exclusive lock. While the database administrator is working with his transaction, a sophisticated user named Joe wants to add a new entry: T_ID: 7, Name: Natasha, Balance: P9,000. Using SERIALIZABLE command, write queries that will demonstrate these two (2) concurrent transactions. (Note: You can use while loop in order to update all the rows with a specific value.) Mr. and Mrs. Stark share an access to an account named Stark. On August 21, 2020 Mr. Stark wants to withdraw an amount of P1,000 to his account. While Mr. Stark is working on his transaction, Mrs. Stark start a new transaction that will view the balance of their account. She sees the balance as P14,000. Stark on the other hand, did not confirm his transaction and the system automatically aborted his requested transaction. Using READ UNCOMMITTED, write queries that will demonstrate this concurrent transaction. Output for Mr. Stark's transaction: Output for Mrs. Stark's transaction: On August 28, 2020, the database administrator creates a new transaction on the Accounts table. Still, he wants to obtain a lock that will prevent any other transaction from modifying any rows from it while he was working with his transaction. But he wants other transactions to be able to insert new entries. Meanwhile, an application programmer inserts a new entry in Accounts table: TID: 6, Name: Clint, Balance: P19,000. At the same time, a sophisticated user wants to modify the balance of Thor by deducting a P500. Using the REPEATABLE READ command, write queries that will demonstrate these three (3) concurrent transaction. Output for database admin starting the transaction: Output for the database administrator: Output for Joe: Query executed successfully. Query executed successfully. Srocedures: 1. Create a database named ConcurrencyControl and create a two (2) tables named Accounts and Transac_History and put the following data. Table 2. Transac_History Note: To understand the data from the Transac_History table clearly, a negative amount means the transaction for that entry deducts the specified amount in the corresponding Account ID or A_ID. A/so, if the two (2) entries have the same T1D, it means that they have a transaction between them where they transfer their funds. Output for the database admin during the execution of the transaction: Query executed successfully. Output for the database admin after the execution of the transaction: (3) Query executed successtuly. On the same day, the database administrator creates a new transaction again by adding up a P1000 balance to all rows in the Accounts table. This time, he wants his transaction to obtain an exclusive lock. While the database administrator is working with his transaction, a sophisticated user named Joe wants to add a new entry: T_ID: 7, Name: Natasha, Balance: P9,000. Using SERIALIZABLE command, write queries that will demonstrate these two (2) concurrent transactions. (Note: You can use while loop in order to update all the rows with a specific value.) Mr. and Mrs. Stark share an access to an account named Stark. On August 21, 2020 Mr. Stark wants to withdraw an amount of P1,000 to his account. While Mr. Stark is working on his transaction, Mrs. Stark start a new transaction that will view the balance of their account. She sees the balance as P14,000. Stark on the other hand, did not confirm his transaction and the system automatically aborted his requested transaction. Using READ UNCOMMITTED, write queries that will demonstrate this concurrent transaction. Output for Mr. Stark's transaction: Output for Mrs. Stark's transaction: On August 28, 2020, the database administrator creates a new transaction on the Accounts table. Still, he wants to obtain a lock that will prevent any other transaction from modifying any rows from it while he was working with his transaction. But he wants other transactions to be able to insert new entries. Meanwhile, an application programmer inserts a new entry in Accounts table: TID: 6, Name: Clint, Balance: P19,000. At the same time, a sophisticated user wants to modify the balance of Thor by deducting a P500. Using the REPEATABLE READ command, write queries that will demonstrate these three (3) concurrent transaction. Output for database admin starting the transaction: Output for the database administrator: Output for Joe: Query executed successfully. Query executed successfully. Srocedures: 1. Create a database named ConcurrencyControl and create a two (2) tables named Accounts and Transac_History and put the following data. Table 2. Transac_History Note: To understand the data from the Transac_History table clearly, a negative amount means the transaction for that entry deducts the specified amount in the corresponding Account ID or A_ID. A/so, if the two (2) entries have the same T1D, it means that they have a transaction between them where they transfer their funds. Output for the database admin during the execution of the transaction: Query executed successfully. Output for the database admin after the execution of the transaction: (3) Query executed successtuly. On the same day, the database administrator creates a new transaction again by adding up a P1000 balance to all rows in the Accounts table. This time, he wants his transaction to obtain an exclusive lock. While the database administrator is working with his transaction, a sophisticated user named Joe wants to add a new entry: T_ID: 7, Name: Natasha, Balance: P9,000. Using SERIALIZABLE command, write queries that will demonstrate these two (2) concurrent transactions. (Note: You can use while loop in order to update all the rows with a specific value.) Mr. and Mrs. Stark share an access to an account named Stark. On August 21, 2020 Mr. Stark wants to withdraw an amount of P1,000 to his account. While Mr. Stark is working on his transaction, Mrs. Stark start a new transaction that will view the balance of their account. She sees the balance as P14,000. Stark on the other hand, did not confirm his transaction and the system automatically aborted his requested transaction. Using READ UNCOMMITTED, write queries that will demonstrate this concurrent transaction. Output for Mr. Stark's transaction: Output for Mrs. Stark's transaction: On August 28, 2020, the database administrator creates a new transaction on the Accounts table. Still, he wants to obtain a lock that will prevent any other transaction from modifying any rows from it while he was working with his transaction. But he wants other transactions to be able to insert new entries. Meanwhile, an application programmer inserts a new entry in Accounts table: TID: 6, Name: Clint, Balance: P19,000. At the same time, a sophisticated user wants to modify the balance of Thor by deducting a P500. Using the REPEATABLE READ command, write queries that will demonstrate these three (3) concurrent transaction. Output for database admin starting the transaction: Output for the database administrator: Output for Joe: Query executed successfully. Query executed successfully. Srocedures: 1. Create a database named ConcurrencyControl and create a two (2) tables named Accounts and Transac_History and put the following data. Table 2. Transac_History Note: To understand the data from the Transac_History table clearly, a negative amount means the transaction for that entry deducts the specified amount in the corresponding Account ID or A_ID. A/so, if the two (2) entries have the same T1D, it means that they have a transaction between them where they transfer their funds
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started