KODAMA & CO. / ENGINEERING HERITAGE

DESIGNED FROM THE FOUNDATION.

KDB 4.0 YosemiteLeaf-scale NoSQL database engine

Our database.
Your next build.

Store it. Find it. Update it. Recover when things go wrong. Since 2009, we’ve built those capabilities into KDB 4.0 Yosemite, our own database engine written in C#. Now we’re sharing that work to help other developers build what comes next.

Explore our approach
The foundations of KDBAn illustration of three layers: data storage, indexing, and access control. 03 / CONTROL 02 / INDEX KDB01 / DATA PROPRIETARY ENGINEENGINEERED BY Kodama & Co.
2009—2016Years of development
and refinement
Our own engineDesigned from the
storage format up
C# / .NETThe foundation of
our implementation

01 / OUR APPROACH

We build the foundations.
And know what’s inside.

In 2009, we began developing KDB to handle the fundamentals of data storage. We designed the file format and index, then implemented record lookup, updates, and exclusive file access. In 2010, we added integrity checks and automatic repair to address interrupted operations.

Building a database means making decisions at every level: how records are laid out, how keys point to data, and what happens when an operation stops halfway through. We brought those pieces together in one engine. KDB embodies a strength we’ve built at Kodama & Co.: the ability to design a system from the inside out and turn that design into working software.

KDB 4.0 YosemiteOUR OWN DATABASE TECHNOLOGY
PART OF KODAMA & CO.’S ENGINEERING HERITAGE

02 / FEATURES

Light to run.
Simple to use.

KDB 4.0 Yosemite is a leaf-scale NoSQL database engine. It runs inside your application, works without SQL, and asks very little of your server or your team.

  1. 01Fast by design.

    There’s no SQL to parse and no table relationships to resolve. Requests go straight to the data, which keeps every read and write quick.

  2. 02No SQL, no SQL injection.

    KDB doesn’t use SQL, so there’s nothing to inject. Input from web forms can’t be turned into a query, which rules out SQL injection by design.

  3. 03Nothing new to learn.

    The interface is small and easy to read. Your team can work with KDB without database training, and adding it to a system takes very little effort.

  4. 04No load when idle.

    KDB runs as a library inside your application, with no background service. When nothing is calling it, it uses no CPU.

  5. 05Backups without downtime.

    Back up KDB while it’s online. Systems that run around the clock can keep running.

  6. 06Just add the library.

    There’s no installer and no configuration to work through. Place the DLL with your application and KDB is ready.

  7. 07Consistent across threads.

    Built-in locking keeps your data consistent when multiple threads read and write at the same time.

  8. 08Tables in separate files.

    The file structure is simple, and every table is stored independently. Copy, move, or back up one table without touching the rest.

  9. 09Built for Windows and .NET.

    KDB runs on Windows with the .NET Framework. It’s written in managed C# on standard .NET APIs, so it works wherever a supported runtime is available.

  10. 10Any language, even in names.

    Text is stored as UTF-8, so data in any language works. Table and column names can use any language too.

  11. 11Ready for 2038.

    KDB’s date handling isn’t affected by the Year 2038 problem.

03 / INSIDE KDB

From bytes on disk
to data you can use.

KDB / SYSTEM STRUCTURECONCEPT
KDB architecture: the API connects to separate data and index filesKDB APICreate / Read / Write / Delete.kdbHEADER + RECORDSUTF-8 / VARIABLE LENGTH.kx1KEY + POINTERCOMPOSITE PRIMARY KEYFILE ACCESS CONTROL / INSPECTION / REPAIR
Storage, indexing, and access control, designed as one system.
  1. 01A format we designed.

    The .kdb file stores variable-length UTF-8 text in a format with its own file and record headers. It tracks data size, record count, and operation status alongside the records themselves.

  2. 02A direct path to each record.

    A separate .kx1 index maps keys to record locations. Composite primary keys let multiple fields work together to identify a record.

  3. 03Operations with control built in.

    KDB supports file creation, record reads, appends, writes, and deletes. We built exclusive file access into write operations, with a timeout when waiting for a lock to clear.

04 / ENGINEERING DEPTH

The details matter.
We build them ourselves.

DESIGN / 01

Every byte
has a place.

A 64-byte file header. A 13-byte record header. We defined how control information and data sit on disk, then built the read and write routines around that structure. That gives us direct control over the format and the code that operates on it.

FILE FORMAT / RECORD STRUCTURE
CONTROL / 02

Records change.
The index follows.

When an update fits the existing record space, KDB writes it in place. When it needs more room, KDB relocates it. Deletions close the gap in the data file and adjust index pointers, keeping storage and lookup working together.

UPDATE / RELOCATION / INDEX CONTROL
RECOVERY / 03

Recovery became
part of the design.

In January 2010, we implemented automatic file recovery. KDB records operation status, checks and repairs file integrity after abnormal states, and rebuilds the index when needed. Our design extends beyond everyday reads and writes to what happens after an interruption.

STATUS TRACKING / INSPECTION / REPAIR

05 / JAPAN & .NET, 2009–2010

Built as Windows
was changing.

Windows XP still powered much of corporate Japan. Vista was in use, and Windows 7 was about to arrive. We built KDB on the .NET Framework, combining a common runtime with a storage engine we could develop and maintain ourselves.

COMPATIBILITY / 01

A common runtime
across Windows.

We started KDB on October 5, 2009, before Windows 7’s general release. Standard .NET APIs handle file access and text processing, allowing us to draw on the framework’s compatibility across Windows versions wherever a supported runtime is available.

WINDOWS XP / VISTA / 7 — .NET FRAMEWORK
DEPLOYMENT / 02

Managed C#.
Right down to storage.

We implemented storage, lookup, and access control in managed C#. KDB uses standard .NET APIs without a native DLL for an external database engine. That keeps the storage layer’s dependencies focused and its implementation within our own code.

C# / SYSTEM.IO / SYSTEM.TEXT
EXPERTISE / 03

More choices.
Our own foundation.

System.Data.SQLite arrived in 2005; SQL Server Compact 3.5 followed in 2008. As storage options expanded, we developed our own file format, key lookup, access control, and repair routines. We built the capability to create and evolve a database engine ourselves.

STORAGE / INDEX / CONTROL / REPAIR
The backdrop: XP dominated. Windows 7 was just getting started.Windows 7 launched on October 22, 2009. An April 2010 survey published in Japan’s Internet White Paper 2010 found that businesses named XP Professional (59.4%) and XP Home Edition (13.6%) as their primary client PC operating systems far more often than Vista (9.0%) or Windows 7 (4.7%). These figures reflect businesses’ survey responses about their primary OS.
We began developing KDB during that transition, before NuGet 1.0’s January 2011 release. We combined the reach of .NET with control over our own storage code, building expertise we could carry forward as the surrounding tools changed.
Sources: Japan business OS survey (Impress, in Japanese) / Microsoft timeline (in Japanese) / Visual Studio release history / NuGet 1.0 release notes / System.Data.SQLite history / SQL Server Compact 3.5 timeline

06 / KDB & SQLITE

Our engine.
Our code. Our expertise.

In the .NET environment of 2009–2010, System.Data.SQLite connected applications to SQLite’s C engine through an ADO.NET provider. With KDB, we implemented storage and record operations directly in C#. That put the entire engine within the scope of our development team.

Design and deployment approaches in the .NET development environment of 2009–2010.
Design considerationKDB Kodama & Co.SQLite Via System.Data.SQLite at the time
ImplementationC# and standard .NET APIs
Storage, lookup, and access control implemented in the KDB class.
A database engine written in C, accessed through an ADO.NET provider.
Integration and distributionNo external database engine DLL
The core data management implementation lives in one C# source file.
Deployment includes the provider and native engine. Mixed-mode builds require a suitable target architecture.
Windows deploymentA standard .NET foundation
Uses the compatibility of a supported .NET Framework runtime, without direct dependencies on Windows-specific APIs or native database DLLs.
The provider and native engine must match the supported environment and target architecture.
Data accessA direct record API
Reads and writes use string arrays and keys, backed by our own data and index formats.
A general-purpose relational database with SQL for table definitions, queries, joins, and aggregation.
Interrupted operationsStatus tracking, inspection, and repair
Automatic recovery introduced in 2010, with index rebuilding when needed.
Transaction atomicity and rollback of interrupted changes using a rollback journal.
Engineering controlOur code, from file format to repair
We directly maintain and modify the engine’s internal structures and behavior.
Uses the published SQLite and provider implementations, with source available for inspection and modification.
The ability to build it. The freedom to improve it.We designed KDB’s storage layout, lookup paths, update routines, and recovery behavior as a single system. We know how those parts work together, and we can change them ourselves. That combination of framework expertise and independent engine development is a defining strength of Kodama & Co.
Sources: System.Data.SQLite origins / Historical provider implementation and deployment / SQLite atomic commit

07 / MILESTONES

Built. Refined.
Then taken further.

  1. Development begins

    We began KDB and implemented our own storage and lookup mechanisms. Performance improvements followed that same month as we developed the core engine.

  2. Defining the data structures

    We established the file and record headers, organizing stored data and control information into the structures that support KDB’s operations.

  3. Adding recovery and evolving the format

    We implemented automatic file recovery, advanced the format through versions 2 and 3, and fixed defects. Those improvements strengthened both the storage design and its handling of abnormal states.

  4. KDB 4.0 Yosemite

    We named version 4.0 Yosemite and set its direction: a leaf-scale NoSQL database engine that runs light and stays easy to use.

  5. Expanding data access

    We added ReadIndex to retrieve a record by index number and GetRecordCount to return the record count, extending the ways applications can work with KDB.

08 / KODAMA & CO.

We know the foundation.
Because we built it.

Since 2009, we’ve designed the format, built the index, and implemented the update and recovery routines that make KDB work. It’s a concrete expression of our ability to take a system from its underlying structures to a working implementation.

We’re making KDB available at no cost so other developers can put that work to use. For us, sharing the engine is another way to carry our engineering forward: giving the next project a foundation to build on.

Powered by KDBIf your site runs on KDB, you’re welcome to display one of these badges.
Powered by KDB badge, transparent backgroundPowered by KDB badge, white background
Take a closer look