Getting Started with the Oracle Berkeley DB SQL APIs

Legal Notice

This documentation is distributed under an open source license. You may review the terms of this license at: http://www.oracle.com/technetwork/database/berkeleydb/downloads/oslicense-093458.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

9/9/2013


Table of Contents

Preface
Conventions Used in this Book
For More Information
Contact Us
1. Berkeley DB SQL: The Absolute Basics
BDB SQL Is Nearly Identical to SQLite
Getting and Installing BDB SQL
On Windows Systems
On Unix
The BDB SQL ADO.NET Interface
Accessing BDB SQL Databases
The Journal Directory
Unsupported PRAGMAs
Changed PRAGMAs
PRAGMA auto_vacuum
PRAGMA incremental_vacuum
PRAGMA journal_size_limit
Added PRAGMAs
PRAGMA bdbsql_error_file
PRAGMA bdbsql_lock_tablesize
PRAGMA bdbsql_shared_resources
PRAGMA bdbsql_single_process
PRAGMA bdbsql_system_memory
PRAGMA bdbsql_vacuum_fillpercent
PRAGMA bdbsql_vacuum_pages
PRAGMA multiversion
PRAGMA snapshot_isolation
PRAGMA trickle
PRAGMA txn_bulk
Replication PRAGMAs
Miscellaneous Differences
Berkeley DB Concepts
Encryption
Using Sequences
create_sequence
nextval
currval
drop_sequence
Differences for Users of other SQL Engines
2. Locking Notes
Internal Database Usage
Lock Handling
SQLite Lock Usage
Lock Usage with the BDB SQL Interface
3. Berkeley DB Features
Using Bulk Loading
Using Multiversion Concurrency Control
Selecting the Page Size
4. Using Replication with the SQL API
Replication Overview
Replication Masters
Elections
Durability Guarantees
Two-Site Replication Groups
Replication PRAGMAs
PRAGMA replication
PRAGMA replication_initial_master
PRAGMA replication_local_site
PRAGMA replication_remote_site
PRAGMA replication_remove_site
PRAGMA replication_verbose_output
PRAGMA replication_verbose_file
Displaying Replication Statistics
Replication Usage Examples
Example 1: Distributed Read at 3 Sites
Example 2: 2-Site Failover
5. Administrating Berkeley DB SQL Databases
Backing Up Berkeley DB SQL Databases
Backing Up Replicated Berkeley DB SQL Databases
Syncing with Oracle Databases
Syncing on Unix Platforms
Syncing on Windows Platforms
Syncing on Windows Mobile Platforms
Data Migration
Migration Using the Shells
A. Using the BFILE Extension
Supported Platforms and Languages
BFILE SQL Objects and Functions
BFILE_CREATE_DIRECTORY
BFILE_REPLACE_DIRECTORY
BFILE_DROP_DIRECTORY
BFILE_NAME
BFILE_FULLPATH
BFILE_OPEN
BFILE_READ
BFILE_CLOSE
BFILE_SIZE
BFILE C/C++ Objects and Functions
sqlite3_column_bfile
sqlite3_bfile_open
sqlite3_bfile_close
sqlite3_bfile_is_open
sqlite3_bfile_read
sqlite3_bfile_file_exists
sqlite3_bfile_size
sqlite3_bfile_final