<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: John David L. Perez</title>
    <description>The latest articles on DEV Community by John David L. Perez (@john_davidlperez_f528e).</description>
    <link>https://dev.to/john_davidlperez_f528e</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4160683%2F5bbe3ee7-93ef-4c3e-ac3c-79778e6a4786.jpg</url>
      <title>DEV Community: John David L. Perez</title>
      <link>https://dev.to/john_davidlperez_f528e</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/john_davidlperez_f528e"/>
    <language>en</language>
    <item>
      <title>I Built My Own Database From Scratch — Meet CleaveDB</title>
      <dc:creator>John David L. Perez</dc:creator>
      <pubDate>Sun, 04 Oct 2026 01:10:09 +0000</pubDate>
      <link>https://dev.to/john_davidlperez_f528e/i-built-my-own-database-from-scratch-meet-cleavedb-2494</link>
      <guid>https://dev.to/john_davidlperez_f528e/i-built-my-own-database-from-scratch-meet-cleavedb-2494</guid>
      <description>&lt;p&gt;I Built My Own Database From Scratch — Meet CleaveDB&lt;/p&gt;

&lt;p&gt;I've been building something I've wanted to experiment with for a while: &lt;strong&gt;CleaveDB&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;CleaveDB is a hybrid relational-document graph database built with &lt;strong&gt;Python, Rust, and C++ SIMD&lt;/strong&gt;, with its own query language, graph relationships, and built-in semantic search.&lt;/p&gt;

&lt;p&gt;The idea started with a simple question:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;What if relational data, documents, graphs, and semantic search could live together in one database?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  What makes CleaveDB different?
&lt;/h2&gt;

&lt;p&gt;CleaveDB has its own query language called &lt;strong&gt;CleaveQL&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;POUR&lt;/span&gt; &lt;span class="k"&gt;INTO&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt; &lt;span class="nv"&gt;"alice"&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nv"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nv"&gt;"Alice"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="nv"&gt;"age"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;28&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;You can then query the data:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;SCOOP&lt;/span&gt; &lt;span class="n"&gt;users&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;It also supports graph-style relationships called &lt;strong&gt;Bonds&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;LINK&lt;/span&gt; &lt;span class="nv"&gt;"users:alice"&lt;/span&gt;
&lt;span class="k"&gt;TO&lt;/span&gt; &lt;span class="nv"&gt;"users:bob"&lt;/span&gt;
&lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;MUTUAL&lt;/span&gt; &lt;span class="nv"&gt;"friend"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;And you can traverse those relationships:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;FIND&lt;/span&gt; &lt;span class="nv"&gt;"friend"&lt;/span&gt; &lt;span class="k"&gt;OF&lt;/span&gt; &lt;span class="nv"&gt;"users:alice"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;There's also semantic search:&lt;br&gt;
&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="n"&gt;FIND&lt;/span&gt; &lt;span class="n"&gt;products&lt;/span&gt;
&lt;span class="n"&gt;MEANING&lt;/span&gt; &lt;span class="nv"&gt;"something warm for cold weather"&lt;/span&gt;
&lt;span class="k"&gt;LIMIT&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;So instead of searching only for exact keywords, CleaveDB can search based on meaning.&lt;/p&gt;
&lt;h2&gt;
  
  
  Under the hood
&lt;/h2&gt;

&lt;p&gt;CleaveDB isn't built on top of an existing database engine. I'm building the storage layer myself using &lt;strong&gt;Rust&lt;/strong&gt;, with C++ SIMD optimisations for performance-critical operations.&lt;/p&gt;

&lt;p&gt;The project also includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;B+Tree storage&lt;/li&gt;
&lt;li&gt;WAL and transactions&lt;/li&gt;
&lt;li&gt;Graph relationships&lt;/li&gt;
&lt;li&gt;Semantic/vector search&lt;/li&gt;
&lt;li&gt;Authentication and multi-tenant isolation&lt;/li&gt;
&lt;li&gt;Python bindings&lt;/li&gt;
&lt;li&gt;HTTP, WebSocket and TCP interfaces&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It's still very much a work in progress, but building the pieces from scratch has been a really interesting learning experience.&lt;/p&gt;
&lt;h2&gt;
  
  
  Why build another database?
&lt;/h2&gt;

&lt;p&gt;There are already excellent databases like PostgreSQL, MongoDB, Redis, and Neo4j.&lt;/p&gt;

&lt;p&gt;I'm not trying to replace them.&lt;/p&gt;

&lt;p&gt;CleaveDB is an experiment to see what happens when you combine &lt;strong&gt;relational, document, graph, and semantic capabilities&lt;/strong&gt; into one system.&lt;/p&gt;

&lt;p&gt;If you're interested in databases, Rust, storage engines, graph databases, or just want to see how a database is built from scratch, I'd love to hear your thoughts.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/Tribrix23" rel="noopener noreferrer"&gt;
        Tribrix23
      &lt;/a&gt; / &lt;a href="https://github.com/Tribrix23/CleaveDB" rel="noopener noreferrer"&gt;
        CleaveDB
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Beyond NoSQL. A hyper-fast graph and vector database you query in plain English. Built on a unique Python, Rust, and C++ SIMD architecture with built-in AI semantic search and strict multi-tenant isolation.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;&lt;div&gt;
  &lt;a rel="noopener noreferrer" href="https://github.com/Tribrix23/CleaveDB/assets/CleaveDB.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2FTribrix23%2FCleaveDB%2FHEAD%2Fassets%2FCleaveDB.png" alt="CleaveDB 3.9.0" width="500"&gt;&lt;/a&gt;
  &lt;br&gt;&lt;br&gt;
  &lt;p&gt;&lt;strong&gt;The polyglot, AVX-512 ready , hybrid relational-document graph database with Transformer attention layers.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.python.org/downloads/?Python" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/262eeadeee3f7ea82351c9d0a3d601ec1e8024af17178cfebaa7b0553d62297f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f507974686f6e2d332e31332b2d626c75652e737667" alt="Python"&gt;&lt;/a&gt;
&lt;a href="https://doc.rust-lang.org/edition-guide/rust-2021/index.html" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/8d2491af9319462dd27d3fddcaef0a20e44bbfd98c6f054dc714cc6912127cfc/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f527573742d323032312d6f72616e67652e737667" alt="Rust"&gt;&lt;/a&gt;
&lt;a href="https://github.com/Tribrix23/CleaveDB/blob/main/LICENSE" rel="noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/f057393ac885f515986871aeac9852ee5dedd1127efe65b0f02b6c7a1aae5da3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d437573746f6d5f436f6e73656e742d626c75652e737667" alt="License"&gt;&lt;/a&gt;
&lt;a href="https://www.npmjs.com/package/cleavedb" rel="nofollow noopener noreferrer"&gt;&lt;img src="https://camo.githubusercontent.com/25d5ccc31f2a56630360f697e845a73e62ce7860adcf42bc0940a7104b40d048/68747470733a2f2f696d672e736869656c64732e696f2f6e706d2f762f636c6561766564622e737667" alt="NPM Version"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;CleaveDB 3.9.0&lt;/strong&gt; is a ground-up, hybrid Relational Document &amp;amp; Graph database that eliminates the complexity of traditional SQL &lt;code&gt;JOIN&lt;/code&gt;s, external vector search services, and opaque graph databases. It ships with:&lt;/p&gt;


&lt;ul&gt;

&lt;li&gt;

&lt;strong&gt;Native Graph-Relational Links&lt;/strong&gt;: Documents are not isolated. They are deeply relational, linked natively through ~10 functional Graph "Bonds" that allow unlimited depth, multi-hop traversals with conversational English, completely eliminating the need for &lt;code&gt;JOIN&lt;/code&gt;s.&lt;/li&gt;

&lt;li&gt;A high-performance &lt;strong&gt;Rust storage engine&lt;/strong&gt; built entirely from scratch — no SQLite, no RocksDB, no external storage libraries.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;AVX-512 / AVX2 C++ SIMD extensions&lt;/strong&gt; exist in the Rust engine (vector search runs on C++ AVX-512 extensions).&lt;/li&gt;

&lt;li&gt;A &lt;strong&gt;Python interpreter frontend&lt;/strong&gt; (via PyO3 bindings) that runs the &lt;strong&gt;CleaveQL&lt;/strong&gt; query language.&lt;/li&gt;

&lt;li&gt;

&lt;strong&gt;Real neural Transformer embeddings&lt;/strong&gt; for semantic search via a quantized ONNX model, using ~22MB of RAM.&lt;/li&gt;

&lt;li&gt;A &lt;strong&gt;Go-based distributed coordinator&lt;/strong&gt; for multi-shard…&lt;/li&gt;

&lt;/ul&gt;&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/Tribrix23/CleaveDB" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;I'm especially interested in criticism and ideas for what I should improve next.&lt;/p&gt;

</description>
      <category>database</category>
      <category>rust</category>
      <category>python</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
