Skip to content

sarthak21-negi/go-database

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🗃️ Go Database

A lightweight file-based database built from scratch in Golang, designed to provide efficient and concurrent CRUD (Create, Read, Update, Delete) operations with structured data persistence.
This project demonstrates low-level file handling, concurrency control, and robust logging in a clean, modular Go implementation.


🚀 Features

⚡ Efficient CRUD Operations

  • Supports Create, Read, Update, and Delete operations on structured records.
  • Built with simplicity and performance in mind for local data persistence.

🧵 Concurrent Access Management

  • Implements thread-safe operations using Go’s sync.Mutex.
  • Prevents race conditions and ensures consistency in multi-threaded environments.

📄 JSON-Based Serialization

  • Data is stored and retrieved in JSON format for human-readable and structured storage.
  • Enables smooth encoding/decoding of data objects.

🗂️ Dynamic File Handling

  • Uses Go’s os and path/filepath libraries for flexible file and directory management.
  • Supports automatic creation and cleanup of storage files.

🪵 Structured Logging

  • Integrated with the Lumber logging library for detailed, leveled logs.
  • Improves observability and debugging of database operations.

🧰 Tech Stack

  • Language: Go (Golang)
  • Concurrency: sync.Mutex
  • Data Format: JSON
  • File System: os, path/filepath
  • Logging: Lumber

⚡ Getting Started

Prerequisites

  • Go 1.21 or higher
  • Git

Installation

git clone https://github.com/sarthak21-negi/go-database.git

cd go-database

go mod tidy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages