Oracle Berkeley DB Programmer's Reference Guide 11G Release 2

Total Page:16

File Type:pdf, Size:1020Kb

Oracle Berkeley DB Programmer's Reference Guide 11G Release 2 Oracle Berkeley DB Programmer's Reference Guide 11g Release 2 Legal Notice This documentation is distributed under an open source license. You may review the terms of this license at: http:// www.oracle.com/technology/software/products/berkeley-db/htdocs/oslicense.html Oracle, Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle. Other names may be trademarks of their respective owners. To obtain a copy of this document's original source code, please submit a request to the Oracle Technology Network forum at: http://forums.oracle.com/forums/forum.jspa?forumID=271 Published 3/30/2010 Table of Contents Preface ....................................................................................................... x Conventions Used in this Book .................................................................... x For More Information ......................................................................... x 1. Introduction ............................................................................................ 1 An introduction to data management ............................................................ 1 Mapping the terrain: theory and practice ....................................................... 1 Data access and data management ........................................................ 2 Relational databases .......................................................................... 3 Object-oriented databases .................................................................. 4 Network databases ............................................................................ 4 Clients and servers ........................................................................... 5 What is Berkeley DB? ............................................................................... 6 Data Access Services ......................................................................... 7 Data management services .................................................................. 7 Design ........................................................................................... 8 What Berkeley DB is not ........................................................................... 8 Berkeley DB is not a relational database ................................................. 9 Berkeley DB is not an object-oriented database ....................................... 10 Berkeley DB is not a network database .................................................. 10 Berkeley DB is not a database server .................................................... 10 Do you need Berkeley DB? ........................................................................ 11 What other services does Berkeley DB provide? .............................................. 11 What does the Berkeley DB distribution include? ............................................. 12 Where does Berkeley DB run? .................................................................... 12 The Berkeley DB products ........................................................................ 13 Berkeley DB Data Store ..................................................................... 14 Berkeley DB Concurrent Data Store ...................................................... 14 Berkeley DB Transactional Data Store .................................................... 14 Berkeley DB High Availability .............................................................. 14 2. Access Method Configuration ....................................................................... 15 What are the available access methods? ....................................................... 15 Btree ........................................................................................... 15 Hash ............................................................................................ 15 Queue .......................................................................................... 15 Recno .......................................................................................... 15 Selecting an access method ...................................................................... 15 Hash or Btree? ............................................................................... 16 Queue or Recno? ............................................................................. 17 Logical record numbers ........................................................................... 17 General access method configuration .......................................................... 19 Selecting a page size ....................................................................... 19 Selecting a cache size ...................................................................... 20 Selecting a byte order ...................................................................... 21 Duplicate data items ........................................................................ 22 Non-local memory allocation .............................................................. 23 Btree access method specific configuration ................................................... 23 3/30/2010 DB Reference Guide Page iii Btree comparison ............................................................................ 23 Btree prefix comparison .................................................................... 25 Minimum keys per page .................................................................... 26 Retrieving Btree records by logical record number .................................... 26 Compression .................................................................................. 28 Custom compression .................................................................. 29 Programmer Notes .................................................................... 32 Hash access method specific configuration .................................................... 33 Page fill factor ............................................................................... 33 Specifying a database hash ................................................................ 33 Hash table size ............................................................................... 33 Queue and Recno access method specific configuration ..................................... 34 Managing record-based databases ........................................................ 34 Record Delimiters ..................................................................... 34 Record Length ......................................................................... 34 Record Padding Byte Value .......................................................... 34 Selecting a Queue extent size ............................................................. 35 Flat-text backing files ...................................................................... 35 Logically renumbering records ............................................................ 36 3. Access Method Operations .......................................................................... 38 Database open ...................................................................................... 39 Opening multiple databases in a single file ................................................... 40 Configuring databases sharing a file ...................................................... 41 Caching databases sharing a file .......................................................... 41 Locking in databases based on sharing a file ........................................... 41 Partitioning databases ............................................................................. 42 Specifying partition keys ................................................................... 42 Partitioning callback ........................................................................ 44 Placing partition files ....................................................................... 45 Retrieving records .................................................................................. 46 Storing records ..................................................................................... 46 Deleting records .................................................................................... 47 Database statistics ................................................................................. 47 Database truncation ............................................................................... 47 Database upgrade .................................................................................. 47 Database verification and salvage ............................................................... 48 Flushing the database cache ..................................................................... 48 Database close ...................................................................................... 49 Secondary indexes ................................................................................. 49 Error Handling With Secondary Indexes .................................................. 53 Foreign key indexes ............................................................................... 54 Cursor operations .................................................................................. 57 Retrieving records with a cursor .......................................................... 57 Cursor position flags .................................................................
Recommended publications
  • Oracle Berkeley DB Installation and Build Guide Release 18.1
    Oracle Berkeley DB Installation and Build Guide Release 18.1 Library Version 18.1.32 Legal Notice Copyright © 2002 - 2019 Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Berkeley DB, and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third- party use is permitted without the express prior written consent of Oracle. Other names may be trademarks of their respective owners. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, use, duplication, disclosure, modification, and adaptation of the programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, shall be subject to license terms and license restrictions applicable to the programs.
    [Show full text]
  • Linux from Scratch 版本 R11.0-36-中⽂翻译版 发布于 2021 年 9 ⽉ 21 ⽇
    Linux From Scratch 版本 r11.0-36-中⽂翻译版 发布于 2021 年 9 ⽉ 21 ⽇ 由 Gerard Beekmans 原著 总编辑:Bruce Dubbs Linux From Scratch: 版本 r11.0-36-中⽂翻译版 : 发布于 2021 年 9 ⽉ 21 ⽇ 由 由 Gerard Beekmans 原著和总编辑:Bruce Dubbs 版权所有 © 1999-2021 Gerard Beekmans 版权所有 © 1999-2021, Gerard Beekmans 保留所有权利。 本书依照 Creative Commons License 许可证发布。 从本书中提取的计算机命令依照 MIT License 许可证发布。 Linux® 是Linus Torvalds 的注册商标。 Linux From Scratch - 版本 r11.0-36-中⽂翻译版 ⽬录 序⾔ .................................................................................................................................... viii i. 前⾔ ............................................................................................................................ viii ii. 本书⾯向的读者 ............................................................................................................ viii iii. LFS 的⽬标架构 ............................................................................................................ ix iv. 阅读本书需要的背景知识 ................................................................................................. ix v. LFS 和标准 ..................................................................................................................... x vi. 本书选择软件包的逻辑 .................................................................................................... xi vii. 排版约定 .................................................................................................................... xvi viii. 本书结构 .................................................................................................................
    [Show full text]
  • Oracle Solaris 10 910 Release Notes
    Oracle® Solaris 10 9/10 Release Notes Part No: 821–1839–11 September 2010 Copyright © 2010, Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. If this is software or related software documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT RIGHTS Programs, software, databases, and related documentation and technical data delivered to U.S. Government customers are “commercial computer software” or “commercial technical data” pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations. As such, the use, duplication, disclosure, modification, and adaptation shall be subject to the restrictions and license terms setforth in the applicable Government contract, and, to the extent applicable by the terms of the Government contract, the additional rights set forth in FAR 52.227-19, Commercial Computer Software License (December 2007). Oracle America, Inc., 500 Oracle Parkway, Redwood City, CA 94065.
    [Show full text]
  • Optimizing Oracle Database on Oracle Linux with Flash
    An Oracle White Paper September 2014 Optimizing Oracle Database Performance on Oracle Linux with Flash Optimizing Oracle Database Performance on Oracle Linux with Flash Introduction ....................................................................................... 1 Advantages of Using Flash-based Caching / Storage with an Oracle Database and Oracle Linux .................................................... 2 Overview of Oracle’s Sun Flash Accelerator PCIe Card .................... 2 Configuring Oracle Linux and the Oracle Database for Optimum I/O Performance ................................................................................ 3 Configure Oracle’s Sun Flash Accelerator PCIe Card as a File System ................................................................................. 3 Configure Oracle ASM Using Multiple Oracle’s Sun Flash Accelerator PCIe Cards for Mirroring or for Increased Smart Flash Cache Capacity ............................................................. 5 Configuring the Oracle Database to Use Database Smart Flash Cache .................................................................................. 5 Oracle 11g Release 2 Database Smart Flash Cache ..................... 6 Database Settings ......................................................................... 9 Benchmark Results ........................................................................... 9 Baseline Results .......................................................................... 10 Results with Database Smart Flash Cache Enabled
    [Show full text]
  • Basic Performance Measurements of the Intel Optane DC Persistent Memory Module
    Basic Performance Measurements of the Intel Optane DC Persistent Memory Module Or: It’s Finally Here! How Fast is it? Joseph Izraelevitz Jian Yang Lu Zhang Juno Kim Xiao Liu Amirsaman Memaripour Yun Joon Soh Zixuan Wang Yi Xu Subramanya R. Dulloor Jishen Zhao Steven Swanson* Computer Science & Engineering University of California, San Diego arXiv:1903.05714v3 [cs.DC] 9 Aug 2019 *Correspondence should be directed to [email protected]. Copyright © 2019 the authors. 1 2019-08-09 7041bc9 Abstract After nearly a decade of anticipation, scalable nonvolatile memory DIMMs are finally commercially available with the release of the Intel® Optane™ DC Persistent Memory Module (or just “Optane DC PMM”). This new nonvolatile DIMM supports byte-granularity accesses with access times on the order of DRAM, while also providing data storage that survives power outages. This work comprises the first in-depth, scholarly, performance review of Intel’s Optane DC PMM, exploring its capabilities as a main memory device, and as persistent, byte-addressable memory exposed to user-space applications. For the past several months, our group has had access to machines with Optane DC memory and has investigated the Optane DC PMM’s performance characteristics. This report details the chip’s performance under a number of modes and scenarios, and across a wide variety of both micro- and macro-scale benchmarks. In total, this report represents approximately 330 hours of machine time. Optane DC memory occupies a tier in-between SSDs and DRAM. It has higher latency (346 ns) than DRAM but lower latency than an SSD. Unlike DRAM, its bandwidth is asymmetric with respect to access type: for a single Optane DC PMM, its max read bandwidth is 6.6 GB/s, whereas its max write bandwidth is 2.3 GB/s.
    [Show full text]
  • Oracle Technology Global Price List September 7, 2021
    Prices in USA (Dollar) Oracle Technology Global Price List September 7, 2021 This document is the property of Oracle Corporation. Any reproduction of this document in part or in whole is strictly prohibited. For educational purposes only. Subject to change without notice. 1 of 16 Section I Prices in USA (Dollar) Oracle Database Software Update Processor Software Update Named User Plus License & Support License License & Support Database Products Oracle Database Standard Edition 2 350 77.00 17,500 3,850.00 Enterprise Edition 950 209.00 47,500 10,450.00 Personal Edition 460 101.20 - - Mobile Server - - 23,000 5,060.00 NoSQL Database Enterprise Edition 200 44 10,000 2,200.00 Enterprise Edition Options: Multitenant 350 77.00 17,500 3,850.00 Real Application Clusters 460 101.20 23,000 5,060.00 Real Application Clusters One Node 200 44.00 10,000 2,200.00 Active Data Guard 230 50.60 11,500 2,530.00 Partitioning 230 50.60 11,500 2,530.00 Real Application Testing 230 50.60 11,500 2,530.00 Advanced Compression 230 50.60 11,500 2,530.00 Advanced Security 300 66.00 15,000 3,300.00 Label Security 230 50.60 11,500 2,530.00 Database Vault 230 50.60 11,500 2,530.00 OLAP 460 101.20 23,000 5,060.00 TimesTen Application-Tier Database Cache 460 101.20 23,000 5,060.00 Database In-Memory 460 101.20 23,000 5,060.00 Database Enterprise Management Diagnostics Pack 150 33.00 7,500 1,650.00 Tuning Pack 100 22.00 5,000 1,100.00 Database Lifecycle Management Pack 240 52.80 12,000 2,640.00 Data Masking and Subsetting Pack 230 50.60 11,500 2,530.00 Cloud Management
    [Show full text]
  • Object Storage on Berkeley DB1
    Object Storage on Berkeley DB1 Casey Marshall University of California, Santa Cruz CMPS 229: Storage Systems Abstract took one person less than three months to write a fairly stable and efficient object store, the benefits We have implemented an object storage system, of using an existing, stable system are quite clear. intended to simulate the operation of an Object We also believe that robust, simple, and scalable Storage Device (OSD), on Berkeley DB, a simple storage systems built on top of database systems database library distributed by Oracle Corporation such as Berkeley DB are feasible. (formerly Sleepycat Software) [1]. This object storage layer is used in the Ceph [2] distributed file system as an alternative to the EBOFS object 2 Implementation storage system. Our results indicate that object The implementation of our object store is as an storage systems built on Berkeley DB provide implementation of the C++ class ObjectStore, good performance for many small objects, and that Ceph uses internally for its object storage. competitive performance for large objects; inte- The ObjectStore interface provides a simple grating this system into Ceph has revealed a few set of commands that emulate the command set of performance problems. the T10 object storage specification [3]. These commands fall into the following logical groups: 1 Introduction 1. Object storage commands. These include ba- Ceph is an advanced, distributed, scalable file sys- sic operations for reading, writing, and query- tem being developed at UCSC. Ceph uses smart ing objects. Objects are plain byte sequences, object storage devices managed by an object dis- and are referenced by 128-bit object identifi- tribution and lookup layer called RADOS (reli- ers.
    [Show full text]
  • Developing and Deploying High Performance PHP Applications
    Developing and Deploying High Performance PHP Applications http://joind.in/3396 php|tek 2011 http://blogs.oracle.com/opal Christopher Jones [email protected] Oracle Development http://twitter.com/ghrd 1 This Talk - What to Expect • “State of the Nation” overview of PHP & Oracle Technology • (Some) Best Practices with Oracle Database – With live demos 2 The following is intended to outline our general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remains at the sole discretion of Oracle. 3 About Me • Work in Oracle's Linux & Virtualization Group • Focus on scripting languages – mostly PHP – Have PHP code check-in privileges • Also work on Oracle features that help scripting languages 4 <Insert Picture Here> In The News 5 In the News: NetBeans IDE • Free – GPL / CDDL • NetBeans is very popular for PHP – Strong, passionate community of users • Zend Framework, Symfony, XDebug, PHPUnit, PhpDoc • New! NetBeans 7.0 just released – Generate PhpDoc – Rename refactoring, Safe delete refactoring – Support for PHP 5.3 namespace aliases • See http://netbeans.org/features/php 6 In the News: Oracle Database • Beta Oracle 11.2 “XE” is available – Free – Windows 32 & 64, Linux 64 – Subset of Enterprise Edition features – Same code base as EE – XE
    [Show full text]
  • Data Sheet: Berkeley Database Products
    ORACLE DATA SHEET Oracle Berkeley Database Products The Oracle Berkeley DB product family consists of Berkeley DB, Berkeley DB Java Edition and Berkeley DB XML. All three are high performance, self- contained, software libraries which provide data storage services for applications, devices, and appliances. They deliver superior performance, scalability and availability for applications that must run unattended without administration. Overview The Oracle Berkeley DB family of high performance, self-contained databases provides CONSIDER BERKELEY DB WHEN: developers with a fast, transactional database solution with a track record of reliability, • You need an SQLite API compatible unmatched scalability and five-nines (99.999%) or better availability. Oracle Berkeley database within mobile, handheld or DB is well suited to Independent Software Vendors, device and equipment other hardware devices. manufacturers, and enterprises or software companies building solutions which need a • Performance, scalability, concurrency data management component. The Oracle Berkeley DB family of products provides fast, is important. local persistence with zero oversight administration. • Zero oversight administration in deployment is required Customers and end-users will experience an application that simply works, reliably • Flexibility to choose SQL, XQuery, manages data, scales under extreme load, and requires zero oversight in deployment. Java Object, or Key/Value data Your development team can focus on your application and be confident that Berkeley management. DB will manage your application’s data. • Mobile data synchronization with Oracle Database is a requirement. Storage Engine Design • Failure from recovery must be automatic and reliable The Berkeley DB products are self-contained software components which support your • High availability and fault tolerance are application.
    [Show full text]
  • Getting Started with Berkeley DB Java Edition
    Oracle Berkeley DB, Java Edition Getting Started with Berkeley DB Java Edition 12c Release 2 Library Version 12.2.7.5 Legal Notice Copyright © 2002 - 2017 Oracle and/or its affiliates. All rights reserved. This software and related documentation are provided under a license agreement containing restrictions on use and disclosure and are protected by intellectual property laws. Except as expressly permitted in your license agreement or allowed by law, you may not use, copy, reproduce, translate, broadcast, modify, license, transmit, distribute, exhibit, perform, publish, or display any part, in any form, or by any means. Reverse engineering, disassembly, or decompilation of this software, unless required by law for interoperability, is prohibited. The information contained herein is subject to change without notice and is not warranted to be error-free. If you find any errors, please report them to us in writing. Berkeley DB, Berkeley DB Java Edition and Sleepycat are trademarks or registered trademarks of Oracle. All rights to these marks are reserved. No third-party use is permitted without the express prior written consent of Oracle. Other names may be trademarks of their respective owners. If this is software or related documentation that is delivered to the U.S. Government or anyone licensing it on behalf of the U.S. Government, the following notice is applicable: U.S. GOVERNMENT END USERS: Oracle programs, including any operating system, integrated software, any programs installed on the hardware, and/or documentation, delivered to U.S. Government end users are "commercial computer software" pursuant to the applicable Federal Acquisition Regulation and agency-specific supplemental regulations.
    [Show full text]
  • Forcepoint DLP Supported File Formats and Size Limits
    Forcepoint DLP Supported File Formats and Size Limits Supported File Formats and Size Limits | Forcepoint DLP | v8.8.1 This article provides a list of the file formats that can be analyzed by Forcepoint DLP, file formats from which content and meta data can be extracted, and the file size limits for network, endpoint, and discovery functions. See: ● Supported File Formats ● File Size Limits © 2021 Forcepoint LLC Supported File Formats Supported File Formats and Size Limits | Forcepoint DLP | v8.8.1 The following tables lists the file formats supported by Forcepoint DLP. File formats are in alphabetical order by format group. ● Archive For mats, page 3 ● Backup Formats, page 7 ● Business Intelligence (BI) and Analysis Formats, page 8 ● Computer-Aided Design Formats, page 9 ● Cryptography Formats, page 12 ● Database Formats, page 14 ● Desktop publishing formats, page 16 ● eBook/Audio book formats, page 17 ● Executable formats, page 18 ● Font formats, page 20 ● Graphics formats - general, page 21 ● Graphics formats - vector graphics, page 26 ● Library formats, page 29 ● Log formats, page 30 ● Mail formats, page 31 ● Multimedia formats, page 32 ● Object formats, page 37 ● Presentation formats, page 38 ● Project management formats, page 40 ● Spreadsheet formats, page 41 ● Text and markup formats, page 43 ● Word processing formats, page 45 ● Miscellaneous formats, page 53 Supported file formats are added and updated frequently. Key to support tables Symbol Description Y The format is supported N The format is not supported P Partial metadata
    [Show full text]
  • Java (Software Platform) from Wikipedia, the Free Encyclopedia Not to Be Confused with Javascript
    Java (software platform) From Wikipedia, the free encyclopedia Not to be confused with JavaScript. This article may require copy editing for grammar, style, cohesion, tone , or spelling. You can assist by editing it. (February 2016) Java (software platform) Dukesource125.gif The Java technology logo Original author(s) James Gosling, Sun Microsystems Developer(s) Oracle Corporation Initial release 23 January 1996; 20 years ago[1][2] Stable release 8 Update 73 (1.8.0_73) (February 5, 2016; 34 days ago) [±][3] Preview release 9 Build b90 (November 2, 2015; 4 months ago) [±][4] Written in Java, C++[5] Operating system Windows, Solaris, Linux, OS X[6] Platform Cross-platform Available in 30+ languages List of languages [show] Type Software platform License Freeware, mostly open-source,[8] with a few proprietary[9] compo nents[10] Website www.java.com Java is a set of computer software and specifications developed by Sun Microsyst ems, later acquired by Oracle Corporation, that provides a system for developing application software and deploying it in a cross-platform computing environment . Java is used in a wide variety of computing platforms from embedded devices an d mobile phones to enterprise servers and supercomputers. While less common, Jav a applets run in secure, sandboxed environments to provide many features of nati ve applications and can be embedded in HTML pages. Writing in the Java programming language is the primary way to produce code that will be deployed as byte code in a Java Virtual Machine (JVM); byte code compil ers are also available for other languages, including Ada, JavaScript, Python, a nd Ruby.
    [Show full text]