⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rm_ch2.htm

📁 db.* (pronounced dee-be star) is an advanced, high performance, small footprint embedded database fo
💻 HTM
📖 第 1 页 / 共 3 页
字号:
<p><i>fileid</i><br>An identifier used as a reference for the specified file.</p><p><i>filename</i><br>A string enclosed in double quotes (" ") that names the file.</p><p><i>recname</i><br>An identifier that names a record type.</p><p><i>keyname</i><br>The name of a key field. When listed in a key file statement,<i>keyname</i> can have a prefix identifying the record type(necessary when using the -d option). The format is<i>recname.keyname</i>.</p><p><i>fldname</i><br>An identifier that names a data field.</p><p><i>dim</i><br>A number that specifies the size of an array field dimension.</p><p><i>setname</i><br>An identifier that names a set.</p><p align="center"><b><u>ddlp Keywords</u></b> (<i>not</i> casesensitive)</p><table cellspacing="0" border="0" cellpadding="7" width="542"><tr><td width="26%" valign="top"><p><font size="2">#define</font></p></td><td width="22%" valign="top"><p><font size="2">last</font></p></td><td width="27%" valign="top"><p><font size="2">database</font></p></td><td width="25%" valign="top"><p><font size="2">set</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">asc</font></p></td><td width="22%" valign="top"><p><font size="2">long</font></p></td><td width="27%" valign="top"><p><font size="2">db_addr</font></p></td><td width="25%" valign="top"><p><font size="2">sets</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">ascending</font></p></td><td width="22%" valign="top"><p><font size="2">member</font></p></td><td width="27%" valign="top"><p><font size="2">desc</font></p></td><td width="25%" valign="top"><p><font size="2">static</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">bitmap</font></p></td><td width="22%" valign="top"><p><font size="2">next</font></p></td><td width="27%" valign="top"><p><font size="2">descending</font></p></td><td width="25%" valign="top"><p><font size="2">struct</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">blob</font></p></td><td width="22%" valign="top"><p><font size="2">opt</font></p></td><td width="27%" valign="top"><p><font size="2">directref</font></p></td><td width="25%" valign="top"><p><font size="2">timestamp</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">by</font></p></td><td width="22%" valign="top"><p><font size="2">optional</font></p></td><td width="27%" valign="top"><p><font size="2">double</font></p></td><td width="25%" valign="top"><p><font size="2">thru</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">char</font></p></td><td width="22%" valign="top"><p><font size="2">order</font></p></td><td width="27%" valign="top"><p><font size="2">file</font></p></td><td width="25%" valign="top"><p><font size="2">typedef</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">compound</font></p></td><td width="22%" valign="top"><p><font size="2">owner</font></p></td><td width="27%" valign="top"><p><font size="2">first</font></p></td><td width="25%" valign="top"><p><font size="2">unique</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">const</font></p></td><td width="22%" valign="top"><p><font size="2">record</font></p></td><td width="27%" valign="top"><p><font size="2">key</font></p></td><td width="25%" valign="top"><p><font size="2">unsigned</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">contains</font></p></td><td width="22%" valign="top"><p><font size="2">records</font></p></td><td width="27%" valign="top"><p><font size="2">float</font></p></td><td width="25%" valign="top"><p><font size="2">varilen</font></p></td></tr><tr><td width="26%" valign="top"><p><font size="2">data</font></p></td><td width="22%" valign="top"><p><font size="2">relatedto</font></p></td><td width="27%" valign="top"><p><font size="2">int</font></p></td><td width="25%" valign="top">&nbsp;</td></tr></table><p><font size="2">&nbsp;</font></p><hr><h3><a name="ida" id="ida"></a>ida</h3><p><font size="2">Interactive Database Access utility</font></p><h4>Prototype</h4><pre><font color="#0000FF">ida [-m<i>x</i>] [[-s | -x | -o] [-t] <i>dbname</i>]</font></pre><h4>Description</h4><p><font size="2">The Interactive Database Access utility,<b>ida</b>, is a menu-driven, screen-oriented utility that can beused to retrieve, enter, modify, or delete any information or setrelationships stored in a <b><i>db.*</i></b> database. The utilityis fully described in Chapter 8, "Interactive Database AccessUtility (<b>ida</b>)," of the <b><i>db.*</i></b> <i>User'sGuide</i>. If database <i>dbname</i> is supplied, it will be openedin exclusive access mode unless another open mode option isspecified.</font></p><h4>Options</h4><p><font size="2">-m<i>x</i><br>Selects a lock manager type. See the <b><i>db.*</i></b><i>Multi-User Guide</i> for details.</font></p><p>-s<br>Opens database <i>dbname</i> in shared access mode.</p><p>-x<br>Opens database <i>dbname</i> in exclusive access mode(default).</p><p>-o<br>Opens database <i>dbname</i> in one-user only mode.</p><p>-t<br>Enables an S_DEBUG <b>dberr</b> interrupt call (which prompts theuser for a return) just after a log file has been written and priorto a transaction commit. The purpose is to provide the ability toeasily test automatic recovery using <b>ida</b>, by allowing theuser to abort the program at the prompt.</p><p>&nbsp;</p><hr><h3><a name="initdb" id="initdb"></a>initdb</h3><p><font size="2">Database initialization utility</font></p><h4>Prototype</h4><pre><font color="#0000FF">initdb [-y] <i>dbname</i></font></pre><h4>Description</h4><p><font size="2">The <b>initdb</b> utility initializes the dataand key files in database <i>dbname</i>. A database must beinitialized before any data can be stored in it. If the data andkey files exist, the utility displays the names of the databasefiles and prompts you for confirmation. If you reply with a "y",the files are reinitialized; otherwise, the utility terminates. Ifthe -y option is specified, initialization proceeds without thedisplay of the file names and confirmation prompt.</font></p><blockquote><b><i>Warning:</i></b> This utility will delete allexisting data in the database.</blockquote><h4>Options</h4><p><font size="2">-y<br>Re-initializes database files without displaying the confirmationprompt.</font></p><p>&nbsp;</p><hr><h3><a name="keybuild" id="keybuild"></a>keybuild</h3><p><font size="2">Key file build utility</font></p><h4>Prototype</h4><pre><font color="#0000FF">keybuild [-p#] <i>dbname</i></font></pre><h4>Description</h4><p><font size="2">The <b>keybuild</b> utility rebuilds all keyfiles for the database <i>dbname</i>. Rebuilding key files is atwo-step process. First, the file is reinitialized. Then, eachrecord is sequentially read from each data file record, and eachkey file is re-created from the record contents.</font></p><p>This utility can be used to re-create the key files when<b>dbcheck</b> reports a database inconsistency. The utility canalso construct new key files after you have added or removed keyattributes from fields in your DDL specification. For example, ifyou make an existing key field a non-key, and change a non-key to akey field in your DDL, you can run <b>keybuild</b> to rebuild thekey files for the new schema. You can also use <b>keybuild</b> toreassign key fields to different key files.</p><h4>Options</h4><p><font size="2">-p#<br>Causes # pages to be used for the <b><i>db.*</i></b>cache.</font></p><p>&nbsp;</p><hr><h3><a name="keydump" id="keydump"></a>keydump</h3><p><font size="2">Key file dump utility</font></p><h4>Prototype</h4><pre><font color="#0000FF">keydump [-h] <i>dbname</i> <i>keyfile</i></font></pre><h4>Description</h4><p><font size="2">The <b>keydump</b> utility displays a formatteddump of key file <i>keyfile</i> in database <i>dbname</i>. If the-h option is specified, the key values are printed in hexadecimal;otherwise, the contents are displayed as formatted for data type ofthe key field. The report is written to file <b>stdout</b> and canbe redirected as needed.</font></p><p>The B-tree organization of a <b><i>db.*</i></b> key file isdescribed in section 14.2.3, "Key File Organization," of the<b><i>db.*</i></b> <i>User's Guide</i>. This utility can assist youin learning how these files are structured.</p><h4>Options</h4><p><font size="2">-h<br>Display key values in hexadecimal.</font></p><p>&nbsp;</p><hr><h3><a name="keypack" id="keypack"></a>keypack</h3><p><font size="2">Key file packing utility</font></p><h4>Prototype</h4><pre><font color="#0000FF">keypack [-u<i>num</i>] [-o|-x] [-t <i>path</i>] [-b <i>path</i>] [-k <i>path</i>] [-p<i>num</i>] [-m<i>x</i>] <i>dbname</i> [<i>keyfile</i>]</font></pre><h4>Description</h4><p><font size="2">This utility fills the B-tree nodes in a key file(or all key files if <i>keyfile</i> is not specified), reducing thenumber of nodes required in the B-tree. A B-tree node, created bythe <b><i>db.*</i></b> runtime library, will be at least half full,and will have at least one empty key slot. (See section 14.2.3,"Key File Organization," of the <b><i>db.*</i></b> <i>UsersGuide</i>.) The normal fill level in a B-tree is between 50% and95%.</font></p><p>The utility can create B-tree nodes that are nearly 100% full.However, if a B-tree is packed, the nodes will be split almostimmediately as more keys are added. For this reason, the<b>keypack</b> utility is beneficial when used on key files thatare not going to be changed. Any database that is loaded for use byread-only applications should have its key files packed.</p><h4>Options</h4><p><font size="2">-u<i>num</i><br>Specifies the number of key slots to leave empty. Default is 1. If<i>num</i> is 0, the resulting key files will only contain keyfields of static record types and cannot be modified.</font></p><p>-o<br>Opens the database in one-user mode (default).</p><p>-x<br>Opens the database in exclusive access mode.</p><p>-t <i>path</i><br>Specifies the location of the temporary packed key file. Whenfinished, the original key file is deleted and the temporary packedkey file is renamed to the original key file name. If <i>path</i>specifies a different drive, then <b>keypack</b> moves thetemporary packed key file to the device containing the original keyfile. By default, the current directory is used.</p><p>-b <i>path</i><br>Specifies the path to where a backup of the original key files willbe copied.</p><p>-k <i>path</i><br>Specifies the path to where the packed key files will be placed.The original key files do not change or move. This option overridesboth -t and -b.</p><p>-p<i>num</i><br>Sets pages in the <b><i>db.*</i></b> cache to <i>num</i>.</p><p>-m<i>x</i><br>Selects a lock manager type. See the <b><i>db.*</i></b><i>Multi-User Guide</i> for details.</p><p>&nbsp;</p><hr><h3><a name="prdbd" id="prdbd"></a>prdbd</h3><p><font size="2">Dictionary print utility</font></p><h4>Prototype</h4><pre><font color="#0000FF">prdbd [-c] <i>dbname</i></font></pre><h4>Description</h4><p><font size="2">This utility displays the contents of thedatabase dictionary file<i>,</i> &lt;<b>dbname</b>&gt;<b>.dbd</b>,for database <i>dbname</i>. The utility will report the defaultdatabase page size and each entry in the file table, record table,field table, set table, member table, sort field table, and keytable that constitutes the internal form of the <b><i>db.*</i></b>database dictionary. The report is written to <b>stdout</b> and canbe redirected as desired.</font></p><p>The utility prints symbolic names wherever possible. If you wantthe record, set, and field numbers only, use the -c option.</p><p>Section 14.3, "Database Dictionary Table Structure," of the<b><i>db.*</i></b> <i>User's Guide</i> describes in detail theorganization of a <b><i>db.*</i></b> database dictionary. Ifrequired by the application, this utility will help you understandand make use of the dictionary in your own applications, probablythrough the <b>d_internals</b> function.</p><h4>Options</h4><p><font size="2">None.</font></p><p><a href="RM_Ch3.htm">Next Page</a></p></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -