Documentation
Technical documentation and other resources for using hamsterdb Embedded Storage. Scroll down for Samples in Java, C#, Visual Basic.NET and Python.Samples for C/C++
The samples are part of the hamsterdb Embedded Storage sources; you can find them in the directory samples. For your convenience, they are available for downloading.db1.c
Simple example of creating a Database, inserting some items, search for these items and erase them
db2.c
Uses a Cursor to copy one Database to another; this can also be used to copy an In-Memory Database into a file Database and vice versa
db3.c
Demonstrates how to use hamsterdb Embedded Storage for sorting large amounts of data
db4.c
Demonstrates the use of Record Number Databases; reads a text file from stdin and creates a Database entry for every word. Then prints all words in the original order.
db5.c
Demonstrates the use of duplicate items; reads a text file from stdin and creates a Database entry for every word, even if the word is a duplicate. Then prints all words in alphabetical order and prints the line number of each occurrence.
db6.cpp
Same as db1.c, but written in C++
env1.c
Shows how to use Environments; creates two Databases to manage Customers and Orders
env2.c
Shows how to use Environments; creates two Databases to manage Customers and Orders, and a third Database with duplicate keys for the 1:n relation.
env3.cpp
Same as env2.c, but written in C++
Samples for Java
Db1.javaSimple example of creating a Database, inserting some items, search for these items and erase them
Env3.java
Shows how to use Environments; creates two Databases to manage Customers and Orders, and a third Database with duplicate keys for the 1:n relation.
Samples for C#
SampleDb1.csSimple example of creating a Database, inserting some items, search for these items and erase them
SampleEnv3.cs
Shows how to use Environments; creates two Databases to manage Customers and Orders, and a third Database with duplicate keys for the 1:n relation.
Samples for Visual Basic.NET
Module1.vbSimple example of creating a Database, inserting some items, search for these items and erase them.
Samples for Python
db1.pySimple example of creating a Database, inserting some items, search for these items and erase them
env1.py
Shows how to use Environments; creates two Databases to manage Customers and Orders