How nam178/foodb works
Project type and purpose
• This is a tutorial/example project showing how to build a block-based embedded database with a B-Tree index in C#.
• It consists of three main deliverables:
• FooCore: the core database engine (block storage, record storage, B-Tree index, serializers).
• FooApplication: a sample console app that demonstrates storing/retrieving “Cow” records on top of FooCore.
• FooTest: unit tests (NUnit) that validate core behaviors (block storage, B-Tree operations, serialization).
File structure
• Top-level solution FooDB.sln orchestrates three projects.
• FooCore directory:
• Interfaces (IBlockStorage, IRecordStorage, ITreeNodeManager, ISerializer, etc.)
• Implementations (BlockStorage, RecordStorage, TreeDiskNodeManager, TreeMemoryNodeManager, Tree, serializers, helpers)
• B-Tree classes (TreeNode, TreeTraverser, TreeHelper, TreeDiskNodeSerializer, etc.)
• Byte‐order and stream‐extension utilities.
• FooApplication directory:
• Domain model (CowModel)
• Database façade (ICowDatabase, CowDatabase)
• Serializers specific to domain (CowSerializer, GuidSerializer, StringIntSerializer)
• Console entrypoint (Program.cs)
• FooTest directory: NUnit test fixtures covering storage and tree operations.
• packages folder holds external dependencies (NUnit).
README for additional insights
• Describes purpose: “build a block-based database with B-Tree index”