Cursors:
A cursor is "opened” on a specific set as well as thereafter points exclusively to records in that set. Subsequent to a cursor is opened it may be copied, moved or closed. Whereas a cursor is opened it may be utilized to manipulate the record it addresses.
Records are addressed beside cursors. Cursors provide the functions of
A cursor is an transient object that is created from a descriptor when a transaction is initiated or during transaction execution by an explicit OPEN_CURSOR command. As well one may COPY_CURSOR a cursor to make another instance of the cursor with independent positioning. A cursor is opened on a exact set (which thereby defines the enumeration order (next) of the cursor.) A cursor is shattered by the CLOSE_CURSOR command.
Operations on cursors:
Operators on cursors comprise:
FETCH (<cursor> [, <position>]) [HOLD] RETURNS(<record>)
This retrieves the record pointed at by the named cursor. The record is enthused to the specified target. If the position is precise the cursor is first positioned. If HOLD is specific the record is locked for update (exclusive) or else the record is locked in share mode.
INSERT (<cursor>[, <position>], <record>)
Inserts the accurate record into the set specified by cursor. If the set is key sequenced or else entry sequenced then the cursor is moved to the correct position before the record is inserted otherwise the record is inserted at (after) the current position of the cursor in the set. If the record type automatically emerges in other sets, it as well inserted in them.
UPDATE (<cursor> [, <position>],<new_record>)
If position is précised the cursor is first positioned. The new record is subsequently inserted in the set at the cursor position replacing the record pointed at by the cursor. If the set is sequenced in the updated fields this may cause the record and cursor to move in the set.
DELETE (<cursor> [, <position>])
Deletes the record pointed at by the cursor subsequent to optionally repositioning the cursor.
MOVE_CURSOR (<cursor>, <position>) HOLD
Repositions the cursor in the set.
Cursor positioning:
A cursor is opened to navigate a particular set and positioning expressions have the syntax
--+-------------<RID>-------------------------------------------+-------------+-; +-------------FIRST--------------------------------------------+ | +--------------N-TH---------------------------------------------+ +-CHILD-----+ +--------------LAST --------------------------------------------+---+---------+ +---NEXT-------+ + +-PARENT--+ +--PREVIOUS--+-<SELECTION EXPRESSION>------+ +-GROUP---+ +------------------+
Where RID, FIRST, N-th, as well as LAST specify specific record occurrences while the other options specify the address relative to the current cursor position. It is as well possible to set a cursor from another cursor.
The selection expression may be whichever Boolean expression valid for all record types in the set. The selection expression comprises the relational operators: =,!=, >, <, <=, >= and for character strings a ‘matches-prefix’ operator sometimes called generic key. If next or else previous is specified, the set should be searched sequentially because the current position is relevant. Or else the search can employ hashing or indices to locate the record. The selection expression search perhaps performed via an index which maps field values into RIDs.
Illustration of commands are:
FETCH (CURSOR1, NEXT NAME='SMITH') HOLD RETURNS (POP);DELETE (CURSOR1, NEXT NAME='JOE' CHILD);INSERT (CURSOR1, , NEWCHILD);
For partitioned sets one may perhaps point the cursor at a specific partition by qualifying these operators by adding the modifier GROUP. A cursor on a parent-child or else partitioned set points to both a parent record and a child record or group and child within group. Cursors on such sets contains two components- the parent or group cursor as well as the child cursor. Poignant the parent curser positions the child cursor to the first record in the group or under the parent. For parent-child sets one succeeds the position operator with the modifier NEXT_PARENT in order to locate the first child of the next parent or with the modifier WITHIN PARENT if the search is to be restricted to children of the current parent or group. Or else positional operators operate on children of the current parent.
There are rather unclear issues associated with cursor positioning.
The subsequent is a good set of rules:
a) A cursor is able to have the subsequent positions
b) If the cursor points at a null set subsequently it is null. If the cursor points to a non-null set afterwards it is always non-null.
c) Initially the cursor is prior to the first record unless the OPEN_CURSOR specifies a position.
d) An INSERT operation abscond the cursor pointing at the new record.
e) A DELETE operation leaves the cursor among the two adjacent records or at the top if there is no previous record or at the bottom if there is a previous however no successor record.
f) A UPDATE operation absconds the cursor pointing at the updated record.
g) If an operation not succeed the cursor isn’t altered.
Latest technology based Operating System Online Tutoring Assistance
Tutors, at the www.tutorsglobe.com, take pledge to provide full satisfaction and assurance in Operating System help via online tutoring. Students are getting 100% satisfaction by online tutors across the globe. Here you can get homework help for Operating System, project ideas and tutorials. We provide email based Operating System help. You can join us to ask queries 24x7 with live, experienced and qualified online tutors specialized in Operating System. Through Online Tutoring, you would be able to complete your homework or assignments at your home. Tutors at the TutorsGlobe are committed to provide the best quality online tutoring assistance for Operating System Homework help and assignment help services. They use their experience, as they have solved thousands of the Operating System assignments, which may help you to solve your complex issues of Operating System. TutorsGlobe assure for the best quality compliance to your homework. Compromise with quality is not in our dictionary. If we feel that we are not able to provide the homework help as per the deadline or given instruction by the student, we refund the money of the student without any delay.
tutorsglobe.com relationship between kp and kc assignment help-homework help by online attainment of equilibrium in chemical reactions tutors
Theory and lecture notes of Concept of Construction with ruler and compass all along with the key concepts of construction with ruler and compass, Models of Computation, Theorem of ruler and compass. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Construction with ruler and compass.
fungi tutorial all along with the key concepts of structure of fungi, nutrition and growth of fungi, reproduction in fungi, fungi adaptation and economic significance of fungi
tutorsglobe.com manganese and copper assignment help-homework help by online physiological role and deficiency symptoms tutors
tutorsglobe.com taenia solium assignment help-homework help by online medical parasitology tutors
Detritus organisms-microflora and microfauna tutorial all along with the key concepts of Organisms in the Soil, Factors Affecting Growth of Soil Organisms, Merits of Soil Organisms, Microbial Diversity, Nitrogen Fixation and Transformation of Inorganic
online ged exam preparation course and online ged tutoring package offered by TutorsGlobe are the most comprehensive and customized collection of study resources on the web, offering best collection of ged practice papers, quizzes, ged test papers, and guidance.
get natural resource administration assignment help by best professionals at budget-friendly prices with 24x7 chat support!
Theory and lecture notes of Chi-square test for independence all along with the key concepts of chi-square test for independence, homework help, assignment help. Tutorsglobe offers homework help, assignment help and tutor’s assistance on Chi-square test for independence.
www.tutorsglobe.com offers Function and Procedure sub program homework help, assignment help, case study, writing homework help, online tutoring assistance by computer science tutors.
Photosynthesis-Basic Issues tutorial all along with the key concepts of Introduction to Photosynthesis, Elucidation of Photosynthesis, The Nature of Light
www.tutorsglobe.com offers properties of amines homework help, properties of amines assignment help, online tutoring assistance, organic chemistry solutions by online qualified tutor's help.
TdS Equations tutorial all along with the key concepts of First TdS Equation, Second TdS, Third TdS, Expansion, Compression, change in entropy between two states, TdS equations in terms of k and ß
Avail Logic Assignment Help service and get top-notch solution document with 24x7 support of experts at budget-friendly prices.
www.tutorsglobe.com offers Named Constants homework help, assignment help, case study, writing homework help, online tutoring assistance by computer science tutors.
1943146
Questions Asked
3689
Tutors
1495990
Questions Answered
Start Excelling in your courses, Ask an Expert and get answers for your homework and assignments!!