Oracle Berkeley DB – Getting Started with Berkeley DB for Java

Oracle Berkeley DB. Getting started. Berkeley DB Java. 11g Release 2. (11.2.5.1 version of the library) … This document is intended to provide a rapid introduction to the DB API set and related concepts.

More PDF Content

Getting Started with Berkeley DB for Java
Preface … vi
Conventions Used in this Book … vi
For More Information … vi
Contact Us … vii
1. Introduction to Berkeley DB … 1
About This Manual … 2
Berkeley DB Concepts … 2
Environments … 2
Key-Data Pairs … 3
Storing Data … 4
Storing Data in the DPL … 4
Storing Data using the Base API … 4
Duplicate Data … 5
Replacing and Deleting Entries … 5
Secondary Keys … 6
Using Secondaries with the DPL … 6
Using Secondaries with the Base API. … 6
Which API Should You Use? … 7
Access Methods … 7
Selecting Access Methods … 8
Choosing between BTree and Hash … 8
Choosing between Queue and Recno … 9
Database Limits and Portability … 9
Exception Handling … 9
Error Returns … 10
Getting and Using DB … 10
2. Database Environments … 11
Opening Database Environments … 11
Closing Database Environments … 12
Environment Properties … 13
The EnvironmentConfig Class … 13
EnvironmentMutableConfig … 14
I. Programming with the Direct Persistence Layer … 16
3. Direct Persistence Layer First Steps … 17
Entity Stores … 17
Opening and Closing Environments and Stores … 18
Persistent Objects … 19
Saving and Retrieving Data … 20
4. Working with Indices … 22
Accessing Indexes … 22
Accessing Primary Indices … 22
Accessing Secondary Indices … 22
Creating Indexes … 23
Declaring a Primary Indexes … 23
Declaring Secondary Indexes … 24
Foreign Key Constraints … 25
Page 5
8/27/2010
Getting Started with DB
Page iv
5. Saving and Retrieving Objects … 27
A Simple Entity Class … 27
SimpleDA.class … 28
Placing Objects in an Entity Store … 29
Retrieving Objects from an Entity Store … 32
Retrieving Multiple Objects … 34
Cursor Initialization … 35
Working with Duplicate Keys … 35
Key Ranges … 36
Join Cursors … 37
Deleting Entity Objects … 39
Replacing Entity Objects … 39
6. A DPL Example … 41
Vendor.java … 41
Inventory.java … 43
MyDbEnv … 45
DataAccessor.java … 47
ExampleDatabasePut.java … 48
ExampleInventoryRead.java … 52
II. Programming with the Base API … 57
7. Databases … 58
Opening Databases … 58
Closing Databases … 59
Database Properties … 60
Administrative Methods … 61
Error Reporting Functions … 62
Managing Databases in Environments … 63
Database Example … 65
8. Database Records … 68
Using Database Records … 68
Reading and Writing Database Records … 69
Writing Records to the Database … 70
Getting Records from the Database … 71
Deleting Records … 72
Data Persistence … 73
Using the BIND APIs … 74
Numerical and String Objects … 74
Serializable Complex Objects … 76
Usage Caveats … 77
Serializing Objects … 77
Deserializing Objects … 80
Custom Tuple Bindings … 81
Database Usage Example … 84
9. Using Cursors … 96
Opening and Closing Cursors … 96
Getting Records Using the Cursor … 97
Searching for Records … 99
Working with Duplicate Records … 101
Putting Records Using Cursors … 104
Page 6
8/27/2010
Getting Started with DB
Page v
Deleting Records Using Cursors … 106
Replacing Records Using Cursors … 107
Cursor Example … 108
10. Secondary Databases … 113
Opening and Closing Secondary Databases … 113
Implementing Key Creators … 116
Working with Multiple Keys … 119
Secondary Database Properties … 120
Reading Secondary Databases … 120
Deleting Secondary Database Records … 121
Using Secondary Cursors … 122
Database Joins … 123
Using Join Cursors … 124
JoinCursor Properties … 126
Secondary Database Example … 127
Opening Secondary Databases with MyDbs … 128
Using Secondary Databases with ExampleDatabaseRead … 132
11. Database Configuration … 135
Setting the Page Size … 135
Overflow Pages … 135
Locking … 136
IO Efficiency … 136
Page Sizing Advice … 137
Selecting the Cache Size … 138
BTree Configuration … 138
Allowing Duplicate Records … 138
Sorted Duplicates … 139
Unsorted Duplicates … 139
Configuring a Database to Support Duplicates … 140
Setting Comparison Functions … 141
Creating Java Comparators … 141
Getting Started with Transaction Processing for Java
Berkeley DB Getting Started with Replicated Applications for Java
Berkeley DB Programmer\’s Reference Guide
Berkeley DB Installation and Build Guide
Berkeley DB Getting Started with the SQL APIs
Berkeley DB Javadoc
Berkeley DB Collections Tutorial

Download Oracle Berkeley DB - Getting Started with Berkeley DB for Java pdf from download.oracle.com, 151 pages, 653.81KB.
Related Books

Leave a Reply