Question

In: Computer Science

Hello There, This is discussion Question For Advanced Database Systems Question: (a) Please define what a...

Hello There,

This is discussion Question

For Advanced Database Systems

Question:

(a) Please define what a “trigger” is. If your answer is from the textbook, please state which page of the textbook from which you got the definition. If your answer is not from the textbook, please also include the complete reference.

(b) Please define what “PL/SQL” is. If your answer is from the textbook, please state which page of the textbook from which you got the definition. If your answer is not from the textbook, please also include the complete reference.

(c) Please define what a “transaction” is. If your answer is from the textbook, please state which page of the textbook from which you got the definition. If your answer is not from the textbook, please also include the complete reference.

(d) Please define “concurrency control” in database operations. If your answer is from the textbook, please state which page of the textbook from which you got the definition. If your answer is not from the textbook, please also include the complete reference.

Thank you

Solutions

Expert Solution

Trigger(chapter 5, page - 180 of book Database System Concepts” by Abraham Silberschatz and S Sudarshanpdf)

1.A trigger is special stored procedure that is run when specific actions occur within a database.

2.riggers can be defined to run instead of or after  "Data Manipulation Language" actions such as """INSERT, UPDATE, and DELETE.""".

3.Triggers help the database designer ensure certain actions, such as maintaining an audit file, are completed regardless of which program or user makes changes to the data.

PL/SQL

1.PL/SQL is an extension of Structured Query Language (SQL) that is used in Oracle.

2. PL/SQL == "Procedural Language extensions to SQL".

3. PL/SQL means instructing the compiler 'what to do' through SQL and 'how to do' through its procedural way.

4.It combines the data manipulation power of SQL with the processing power of procedural language to create super powerful SQL queries.

Transaction( chapter 14, page - 627 of book Database System Concepts” by Abraham Silberschatz and S Sudarshanpdf)

1.A transaction is a collection of operations that performs a single logical function in a database application.

2.Transaction-management component ensures that the database remains in a consistent (correct) state despite system failures (e.g., power failures and operating system crashes) and transaction failures.

3.Concurrency-control manager controls the interaction among the concurrent transactions, to ensure the consistency of the
database.

Concurrency control(chapter 15, page - 661 of book Database System Concepts” by Abraham Silberschatz and S Sudarshanpdf)

1. Concurrency control is the procedure in DBMS for managing simultaneous operations without conflicting with each another.

Lock-Based Protocols:--

1.A lock is a mechanism to control concurrent access to a data item.

2.Data items can be locked in two modes :--

a.exclusive (X) mode. Data item can be both read as well as written. X-lock is requested using lock-X instruction.

b.shared (S) mode. Data item can only be read. S-lock is requested using lock-S instruction..

3.Lock requests are made to concurrency-control manager. Transaction can proceed only after request is granted.

4.A locking protocol is a set of rules followed by all transactions while requesting and releasing locks. Locking protocols restrict the set of possible schedules.

5.Starvation is also possible if concurrency control manager is badly designed. For example::--

i..A transaction may be waiting for an X-lock on an item, while a sequence of other transactions request and are granted an S-lock on the same item.

ii.--The same transaction is repeatedly rolled back due to deadlocks.

The Two The Two-Phase Locking Protocol Phase Locking Protocol

1.This is a protocol which ensures conflict-serializable schedules

2.Phase 1: Growing Phase:--

i. transaction may obtain locks

ii. transaction may not release locks.

3.Phase 2: Shrinking Phase:--

i.! transaction may release locks

ii. transaction may not obtain locks

4.The protocol assures serializability. It can be proved that the transactions can be serialized in the order of their lock points (i.e. the point where a transaction acquired its final lock).

5.Cascading roll-back is possible under two-phase locking. To avoid this, follow a modified protocol called strict two-phase locking. Here a transaction must hold all its exclusive locks till it commits/aborts.

6.Rigorous two-phase locking is even stricter: here all locks are held till commit/abort. In this protocol transactions can be serialized in the order in which they commit.

Timestamp-Based Protocols

1.Each transaction is issued a timestamp when it enters the system. If an old transaction Ti has time-stamp TS(Ti), a new transaction Tj is assigned time-stamp TS(Tj) such that TS(Ti).

2.The protocol manages concurrent execution such that the timestamps determine the serializability order.

3. In order to assure such behavior, the protocol maintains for each data Q two timestamp values:---

i.W-timestamp(Q) is the largest time-stamp of any transaction that executed write(Q) successfully.

ii.R-timestamp(Q) is the largest time-stamp of any transaction that executed read(Q) successfully.

4.The timestamp ordering protocol ensures that any conflicting read and write operations are executed in timestamp order.

Validation-Based Protocols

1.Each transaction Ti has 3 timestamps:--

i.Start(Ti) : the time when Ti started its execution

ii.Validation(Ti): the time when Ti entered its validation phase.

iii.Finish(Ti) : the time when Ti finished its write phase.

2.Serializability order is determined by timestamp given at validation time, to increase concurrency. Thus TS(Ti) is given the value of Validation(Ti)..

3.This protocol is useful and gives greater degree of concurrency if probability of conflicts is low. That is because the serializability order is not pre-decided and relatively less transactions will have to be rolled back..

4.If for all Ti with TS (Ti) < TS (Tj) either one of the following condition holds:---

i.finish(Ti) < start(Tj)

ii.start(Tj) < finish(Ti) < validation(Tj) and the set of data items written by Ti does not intersect with the set of data items read by Tj.

5.Justification: Either first condition is satisfied, and there is no overlapped execution, or second condition is satisfied and:--

i.the writes of Tj do not affect reads of Ti since they occur after Ti has finished its reads.

ii.the writes of Ti do not affect reads of Tj since Tj does not read any item written by Ti.


Related Solutions

SUBJECT: DATABASE SYSTEMS !!! Please answer the question as early as possible !!! Question 1 You...
SUBJECT: DATABASE SYSTEMS !!! Please answer the question as early as possible !!! Question 1 You are required to draw a complete Crow’s Foot ERD that includes the following entity relationship components based on the below descriptions: i) Identify all of the entities and its attributes. ii) Identify all possible relationships and its connectivity. iii) Identify the primary key and foreign key for each entity. iv) Identify the participation constraint and cardinality for each relationship. A Super5 company contains many...
IT-344: Database Management Systems please No handwriting thank you Topic of Discussion According to the conflicts...
IT-344: Database Management Systems please No handwriting thank you Topic of Discussion According to the conflicts and failure in transactions processing, the need of concurrency control and recovery appeared. Discuss the differences between concurrency control and recovery in terms of: The purposes. The algorithms. The problems.
IT344- Database Management Systems book Fundamentals Of Database Systems please no copy and paste Use your...
IT344- Database Management Systems book Fundamentals Of Database Systems please no copy and paste Use your own words , No handwriting. Users prefer to stream high quality videos (e.g., watch YouTube) without lagging (i.e., slow loading). In this context, explain how UDP is better than TCP when streaming videos?
Hello, please answer the following discussion topic on what your own option is and what you...
Hello, please answer the following discussion topic on what your own option is and what you think. Obviously excessive consumption of alcohol during pregnancy can lead to developmental problems for a woman's unborn child. Problems include things such as fetal alcohol syndrome. There have been cases in which restaurants have refused to serve pregnant women even a single alcoholic beverage. What do you think about this practice? And what do you think about the whole notion of moderate alcohol consumption...
Database Management Systems IT344 -Fundamentals Of Database Systems book Please Use your own words . sorry...
Database Management Systems IT344 -Fundamentals Of Database Systems book Please Use your own words . sorry No handwriting no copy paste Construct a B+ tree for the following set of key values under the assumption that the number of key values that fit in a node is 3. Key values (3,10,12,14,29,38,45,55,60,68,11,30) Show the step involved in inserting each key value. thank you for your time and effort
hello, please tell me what you think about my twi discussion post about intelligence DISCUSSION 1...
hello, please tell me what you think about my twi discussion post about intelligence DISCUSSION 1 I believe genes do not determine intelligence. Intelligence and genes have very little to do with one another. Genes are what give us our traits such as; eye color and hair color. Knowledge and information develop and grows over time. As an example, two intelligent parents have two children, one that goes to school and one that does not. The child that can develop...
Database Management Systems Question a. Design a simple RETAIL store records database with 3 to 4...
Database Management Systems Question a. Design a simple RETAIL store records database with 3 to 4 tables to track customer purchases of store products and answer the following questions about your database. b. Create an instance (a state) of your database.       
Advanced Database: What is overfitting? What is underfitting? What is decision tree pruning? What is cross-validation?...
Advanced Database: What is overfitting? What is underfitting? What is decision tree pruning? What is cross-validation? What is the role of the activation function? Provide some examples of activation functions. Every answer should be minimum if 4 to 5 lines
Discussion Database Security and UML Often, systems have only one level of security when it comes...
Discussion Database Security and UML Often, systems have only one level of security when it comes to databases. Imagine that someone is trying to add a name (which should be composed only of letters) to a database. The user mistakenly hits a number, and the system rejects the entry. Such security can be implemented at the database management system (DBMS) or the application level. Where would you apply security? Justify your choice. What are some alternative practices or standards of...
Please, answer it correctly ( finance ) 100 word discussion. question: What is (or will be)...
Please, answer it correctly ( finance ) 100 word discussion. question: What is (or will be) your venture’s core competency? Is it vital to providing the Value Proposition? Why?
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT