Skip to content

NihalShinde4933/vectorDB

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

VectorDB

A lightweight, customized Vector Database built in C++ utilizing SQLite as the underlying storage engine.

Prerequisites

Before setting up the project, ensure you have the following installed on your system:

  • GCC/G++ Compiler: Part of MinGW-w64 (Windows) or Clang (macOS) to compile C++17 or higher.
  • VS Code: Recommended IDE with the C/C++ extension installed.

Manual SQLite Setup

To keep the repository lightweight, the SQLite source files are not included in this repository. You must download them manually:

  1. Visit the SQLite Download Page.
  2. Look for the Source Code section and download the sqlite-amalgamation-*.zip file.
  3. Extract the ZIP file. You will see files named sqlite3.c, sqlite3.h, and sqlite3ext.h.
  4. Copy these files into your local project directory structure like this:
    • Move sqlite3.h into the include/ folder.
    • Place the remaining files (sqlite3.c, shell.c) into a folder named sqlite-amalgamation-3530100/ in the project root.

Project Structure

Your project directory should look like this after the manual setup:

vector-db/
├── .vscode/               # Build and launch configurations
├── data/                  # Database storage and mock vectors
│   └── database.txt       
├── include/               # Header files
│   ├── record.h           
│   ├── vectordb.h         
│   └── sqlite3.h          <-- Manually Added
├── src/                   # Main source code
│   └── main.cpp           
├── sqlite-amalgamation-3530100/
│   ├── sqlite3.c          <-- Manually Added
│   └── shell.c            <-- Manually Added
└── .gitignore

How to Build and Run

Using VS Code (Recommended)

  1. Open the vector-db folder in VS Code.
  2. Press Ctrl + Shift + B (Windows) or Cmd + Shift + B (macOS) to run the compilation task configured in .vscode/tasks.json.
  3. Press F5 to run and debug the application.

Using the Terminal

If you prefer to compile manually via the command line, navigate to the project root and run:

g++ -std=c++17 src/main.cpp sqlite-amalgamation-3530100/sqlite3.c -I ./include -o main.exe
./main.exe

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages