Giter Site home page Giter Site logo

csvdb's Introduction

CsvDb

A Csv database generator library.

The database schema generated by this library is used in my dev website diogny.com, it powers a custom CSV Database Engine.

Later I'll include the PHP classes used to read this schema.

Schema of [table].[column] index

Header
Column Index
Page Count
Flags
Key Type
Unique
Structure
Key: <127> PageSize: 16
├──Key: <64> PageSize: 16
│  ├──Key: <32> PageSize: 16
│  │  ├──PageItem, Offse: 8
│  │  └──PageItem, Offset: 272
│  └--Key: <96> PageSize: 16
│     ├──PageItem, Offset: 536
│     └──PageItem, Offset: 800
└--Key: <191> PageSize: 16
   ├──Key: <159> PageSize: 16
   │  ├──PageItem, Offset: 1056
   │  └──PageItem, Offset: 1320
   └──Key: <223> PageSize: 16
	  ├──PageItem, Offset: 1584
	  └──PageItem, Offset: 1848

And an index data with all key and its value(s).

path\bin\
	__schema.bin
	[table].data or [table].csv
	[table].pager
	[table].[index].index
	[table].[index].index.bin
	
path\
	[table].[index].index.txt
	[table].[index].index.tree.txt
	[table].[index].index.duplicates.txt
	
	[table].log

To locate a record inside the CSV data, the engine first locate the index, and then search the tree structure for a matching node entry. Then goes to the mapping page where the record is.

This way the engine can locate a csv record super fast. Currently it supports a single key entry value, and a multiple key value. So a key can have multiple values, the index support this.

No need for a database engine like MySQL, Microsoft SQL for an static relatively medium size database. Later I'll show a timechart with response times.

Later I'll add full support the formats JSON, Array of Objects, CSV.

csvdb's People

Contributors

diogny avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.