| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Terminology</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> |
| 10 | <link rel="up" href="transapp.html" title="Chapter 11. Berkeley DB Transactional Data Store Applications" /> |
| 11 | <link rel="prev" href="transapp_why.html" title="Why transactions?" /> |
| 12 | <link rel="next" href="transapp_fail.html" title="Handling failure in Transactional Data Store applications" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Terminology</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="transapp_why.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 11. |
| 26 | Berkeley DB Transactional Data Store Applications |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="transapp_fail.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="transapp_term"></a>Terminology</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <p>Here are some definitions that will be helpful in understanding |
| 42 | transactions:</p> |
| 43 | <div class="variablelist"> |
| 44 | <dl> |
| 45 | <dt> |
| 46 | <span class="term">Thread of control</span> |
| 47 | </dt> |
| 48 | <dd>Berkeley DB is indifferent to the type or style of threads being used by the |
| 49 | application; or, for that matter, if threads are being used at all — |
| 50 | because Berkeley DB supports multiprocess access. In the Berkeley DB documentation, |
| 51 | any time we refer to a <span class="emphasis"><em>thread of control</em></span>, it can be read as |
| 52 | a true thread (one of many in an application's address space) or a |
| 53 | process.</dd> |
| 54 | <dt> |
| 55 | <span class="term">Free-threaded</span> |
| 56 | </dt> |
| 57 | <dd>A Berkeley DB handle that can be used by multiple threads simultaneously |
| 58 | without any application-level synchronization is called |
| 59 | <span class="emphasis"><em>free-threaded</em></span>.</dd> |
| 60 | <dt> |
| 61 | <span class="term">Transaction</span> |
| 62 | </dt> |
| 63 | <dd>A <span class="emphasis"><em>transaction</em></span> is a one or more operations on one or more |
| 64 | databases that should be treated as a single unit of work. For example, |
| 65 | changes to a set of databases, in which either all of the changes must be |
| 66 | applied to the database(s) or none of them should. Applications specify |
| 67 | when each transaction starts, what database operations are included in |
| 68 | it, and when it ends.</dd> |
| 69 | <dt> |
| 70 | <span class="term">Transaction abort/commit</span> |
| 71 | </dt> |
| 72 | <dd>Every transaction ends by <span class="emphasis"><em>committing</em></span> or <span class="emphasis"><em>aborting</em></span>. |
| 73 | If a transaction commits, Berkeley DB guarantees that any database changes |
| 74 | included in the transaction will never be lost, even after system or |
| 75 | application failure. If a transaction aborts, or is uncommitted when |
| 76 | the system or application fails, then the changes involved will never |
| 77 | appear in the database.</dd> |
| 78 | <dt> |
| 79 | <span class="term">System or application failure</span> |
| 80 | </dt> |
| 81 | <dd><span class="emphasis"><em>System or application failure</em></span> is the phrase we use to |
| 82 | describe something bad happening near your data. It can be an |
| 83 | application dumping core, being interrupted by a signal, the disk |
| 84 | filling up, or the entire system crashing. In any case, for whatever |
| 85 | reason, the application can no longer make forward progress, and its |
| 86 | databases are left in an unknown state.</dd> |
| 87 | <dt> |
| 88 | <span class="term">Recovery</span> |
| 89 | </dt> |
| 90 | <dd><span class="emphasis"><em>Recovery</em></span> is what makes the database consistent after a system |
| 91 | or application failure. The recovery process includes review of log |
| 92 | files and databases to ensure that the changes from each committed |
| 93 | transaction appear in the database, and that no changes from an |
| 94 | unfinished (or aborted) transaction do. Whenever system or application |
| 95 | failure occurs, applications must usually run recovery.</dd> |
| 96 | <dt> |
| 97 | <span class="term">Deadlock</span> |
| 98 | </dt> |
| 99 | <dd><span class="emphasis"><em>Deadlock</em></span>, in its simplest form, happens when one thread of |
| 100 | control owns resource A, but needs resource B; while another thread of |
| 101 | control owns resource B, but needs resource A. Neither thread of |
| 102 | control can make progress, and so one has to give up and release all |
| 103 | its resources, at which time the remaining thread of control can make |
| 104 | forward progress.</dd> |
| 105 | </dl> |
| 106 | </div> |
| 107 | </div> |
| 108 | <div class="navfooter"> |
| 109 | <hr /> |
| 110 | <table width="100%" summary="Navigation footer"> |
| 111 | <tr> |
| 112 | <td width="40%" align="left"><a accesskey="p" href="transapp_why.html">Prev</a> </td> |
| 113 | <td width="20%" align="center"> |
| 114 | <a accesskey="u" href="transapp.html">Up</a> |
| 115 | </td> |
| 116 | <td width="40%" align="right"> <a accesskey="n" href="transapp_fail.html">Next</a></td> |
| 117 | </tr> |
| 118 | <tr> |
| 119 | <td width="40%" align="left" valign="top">Why transactions? </td> |
| 120 | <td width="20%" align="center"> |
| 121 | <a accesskey="h" href="index.html">Home</a> |
| 122 | </td> |
| 123 | <td width="40%" align="right" valign="top"> Handling failure in Transactional Data Store applications</td> |
| 124 | </tr> |
| 125 | </table> |
| 126 | </div> |
| 127 | </body> |
| 128 | </html> |