Professional Documents
Culture Documents
Cuttingtools Machinery
Cuttingtools Machinery
allows insertion and deletion operations from one end of the stack data structure, that is top.
A Stack can be used for evaluating expressions consisting of operands and operators. Stacks can be used for
Backtracking. It can also be used to convert one form of expression to another form. It can be used for systematic
Memory Management.
The process in which a function calls itself directly or indirectly is called recursion and the corresponding function is
called a recursive function. If a function calls itself, it's known as direct recursion. This results in a one-step recursive
call. When a function is mutually called by another function in a circular manner, the function is called an indirect
recursion.
Singly linked lists is the simplest type of linked list in which every node contains some data and a pointer to the next
node of same data type.
A Queue is defined as a linear data structure that is open at both ends and the operations are performed in First In First
Out (FIFO) order. A Circular Queue is a special version of queue where the last element of the queue is connected to the
first element of the queue forming a circle. The operations are performed based on FIFO (First In First Out) principle.
The three schema architecture - This framework is used to describe the structure of a specific database system. It is
also used to separate the user applications and physical database. Contains three-levels and breaks the database down
into three different categories.
Normalization is the process of reorganizing data in a database so that it meets two basic requirements: There is no
redundancy of data, all data is stored in only one place and Data dependencies are logical, all related data items are
stored together.
Transitive dependency occurs when some non-key attribute determines some other attribute. On the other hand,
partial dependency occurs when one primary key determines some other attribute/attributes.
A weak entity is one that can only exist when owned by another one. For example: a ROOM can only exist in a
BUILDING. On the other hand, a TIRE might be considered as a strong entity because it also can exist without being
attached to a CAR. A primary key is a column -- or a group of columns -- in a table that uniquely identifies the rows of
data in that table. Deadlock is an unwanted situation in which two or more transactions are waiting indefinitely for one
another to give up locks. Deadlock is said to be one of the most feared complications in DBMS as it brings the whole
system to a Halt. Deadlock avoidance method,Transactions that access Students and Grades should always access the
tables in the same order. In this way, in the scenario described above, Transaction T1 simply waits for transaction T2 to
release the lock on Grades before it begins. When transaction T2 releases the lock, Transaction T1 can proceed freely.
Another method for avoiding deadlock is to apply both row-level locking mechanism and READ COMMITTED isolation
level. Deadlock recovery: 1.Wait-Die Scheme –If a transaction requests a resource that is locked by another transaction,
then the DBMS simply checks the timestamp of both transactions and allows the older transaction to wait until the
resource is available for execution. 2. Wound Wait Scheme –, if an older transaction requests for a resource held by a
younger transaction, then an older transaction forces a younger transaction to kill the transaction and release the
resource. The younger transaction is restarted with a minute delay but with the same timestamp. If the younger
transaction is requesting a resource that is held by an older one, then the younger transaction is asked to wait till the
older one releases it. These 2 methods of recovery difference It is based on a non-preemptive technique.It is based on
a preemptive technique.In this, older transactions must wait for the younger one to release its data items.In this, older
transactions never wait for younger transactions. The number of aborts and rollback is higher in these techniques.In
this, the number of aborts and rollback is lesser. A transitive dependency occurs when one non-prime attribute is
dependent on another non-prime attribute. If a table schema contains a dependency , where and are non-prime
attributes, we say it contains a transitive dependency. Whenever some indirect relationship happens to cause
functional dependency (FC), it is known as Transitive Dependency. Thus, if A -> B and B -> C are true, then A -> C
happens to be a transitive dependency.Thus, to achieve 3NF, one must eliminate the Transitive Dependency.
State Transition Diagram Of Transaction
Active State – When the instructions of the transaction are running then the transaction is in active state. If all
the ‘read and write’ operations are performed without any error then it goes to the “partially committed state”;
if any instruction fails, it goes to the “failed state”.
Partially Committed – After completion of all the read and write operation the changes are made in main memory or
local buffer. If the changes are made permanent on the DataBase then the state will change to “committed state” and
in case of failure it will go to the “failed state”.
Failed State –When any instruction of the transaction fails, it goes to the “failed state” or if failure occurs in making a
permanent change of data on Data Base.
Aborted State – After having any type of failure the transaction goes from “failed state” to “aborted state” and since in
previous states, the changes are only made to local buffer or main memory and hence these changes are deleted or
rolled-back.
Committed State – It is the state when the changes are made permanent on the Data Base and the transaction is
complete and therefore terminated in the “terminated state”.
Terminated State – If there isn’t any roll-back or the transaction comes from the “committed state”, then the system is
consistent and ready for new transaction and the old transaction is terminated.