
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
Git as a Database - The most over-engineered database solution. Uses Git commit history as a storage engine because 'Git is immutable and distributed, so it's better than SQL.'
The most over-engineered database solution you never knew you needed.
Why use boring SQL when you can have IMMUTABLE, DISTRIBUTED storage?
Installation • Quick Start • API Documentation • FAQ • Contributing
GaaD (Git as a Database) is a revolutionary database engine that leverages Git commit history as a storage layer. Because when you think "high-performance data storage," you naturally think "version control system designed for source code."
Traditional databases are so 1970s. Here's why GaaD is the future:
| Feature | Traditional DB | GaaD |
|---|---|---|
| ACID Compliance | ✅ Yes | ❓ What's that? |
| Indexing | ✅ B-Trees, Hash | ❌ Full table scan only |
| Query Optimization | ✅ Advanced | ❌ Moore's Law will handle it |
| Joins | ✅ Supported | ❌ Just denormalize everything |
| Transactions | ✅ MVCC | ✅ Every insert is a commit! |
| Backup | 🔧 Complex tools | ✅ git push |
| Scalability | 📈 Vertical/Horizontal | 📈 Just add more commits |
| Blockchain Ready | ❌ No | ✅ Absolutely! |
git clone your entire database to any machinegit push to GitHub (free hosting!)SELECT * (that's it, that's all you need)* Scalability claims not verified by any credible source
npm install gaad
# or
yarn add gaad
Requirements:
import { GitDB } from 'gaad';
// Initialize your "database cluster"
const db = new GitDB();
// INSERT - Create an immutable record in the blockchain (Git history)
db.insert('users', {
name: 'Linus Torvalds',
email: 'linus@linux.org',
role: 'Git Lord',
favoriteDatabase: 'Definitely not this one',
});
// SELECT - Full table scan every time!
const users = db.select('users');
console.log(`Found ${users.records.length} users`);
// DROP TABLE - Data still exists, we just promise not to look
db.dropTable('users');
// Get impressive metrics for your manager
const stats = db.getStats();
console.log(`Web Scale Level: ${stats.webScaleLevel}`);
new GitDB(repoPath?: string)Initialize a new GitDB instance. If the repository doesn't exist, we'll create it for you because we're thoughtful like that.
const db = new GitDB(); // Uses current directory
const db2 = new GitDB('/path/to/repo'); // Custom path
Note: The constructor will automatically run git init if no repository exists. This is "CREATE DATABASE IF NOT EXISTS" but cooler.
insert(tableName: string, data: GitDBRecord): InsertResultInsert a record into a "table" (really just a tag in commit messages).
Example:
const result = db.insert('products', {
name: 'Web Scale Sticker',
price: 9.99,
inStock: true,
});
console.log(result.commitHash); // Your "primary key"
Performance Characteristics:
select(tableName: string): SelectResultRetrieve all records from a "table". Performs a full git log scan every time.
Example:
const products = db.select('products');
products.records.forEach(product => {
console.log(`${product.name}: $${product.price}`);
});
Performance Characteristics:
dropTable(tableName: string): string"Delete" a table by creating a tombstone commit. Data remains in history because immutability.
Example:
const tombstoneHash = db.dropTable('old_users');
// Data still exists in git history, we just pinky promise not to read it
Original Implementation: Was going to run rm -rf .git, but lawyers said no.
getStats(): Record<string, string | number>Get database statistics to impress your manager.
Returns:
{
totalCommits: 42,
repoSize: '2.1 MiB',
firstCommitHash: 'a1b2c3d',
latestCommitHash: 'x9y8z7w',
webScaleLevel: 'MAXIMUM', // or 'HIGH' or 'GROWING'
blockchainNodes: 1,
caffeineRequired: 'Infinite'
}
getBackupInstructions(): stringGet instructions for backing up your database (spoiler: it's git push).
// Migration strategy: Don't.
// Just insert new data with a different schema.
// It's called "schema evolution" and it's a feature.
// Master-Slave Replication:
// 1. git push origin master
// 2. (on slave) git pull origin master
//
// Multi-Master Replication:
// Deal with merge conflicts like a real engineer
// Indexes? Where we're going, we don't need indexes.
// Every query is a full table scan.
// This builds character.
// Each insert is already a transaction!
// Atomic? Yes. ✅
// Consistent? Probably. ✅
// Isolated? Sure, why not. ✅
// Durable? It's in Git! ✅
┌─────────────────────────────────────────────┐
│ Application Layer │
│ (Your Beautiful TypeScript Code) │
└──────────────┬──────────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ GitDB Class │
│ • insert() ──► git commit --allow-empty │
│ • select() ──► git log --grep │
│ • drop() ──► git commit (tombstone) │
└──────────────┬──────────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Git Storage Engine │
│ (SHA-1 Hashes = Blockchain Technology™) │
└─────────────────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────┐
│ Your File System │
│ (The Real Database) │
└─────────────────────────────────────────────┘
We don't have any benchmarks because:
But here's what we imagine:
| Operation | GaaD | PostgreSQL | MongoDB |
|---|---|---|---|
| Insert | ~10ms | ~1ms | ~2ms |
| Select (1 row) | ~500ms* | ~0.1ms | ~1ms |
| Select (1000 rows) | ~5000ms* | ~10ms | ~50ms |
| Join | ❌ Not supported | ~5ms | ~20ms |
| Index lookup | ❌ No indexes | ~0.01ms | ~1ms |
* Times increase linearly with total commit count
A: Define "production." If your production is a hobby blog with 2 visitors per month, maybe. Otherwise, absolutely not.
A: You don't. Denormalize everything and embrace the chaos.
A: We have a saying: "O(n) today, O(n) tomorrow, O(n) forever."
A: Only if you want your startup to fail spectacularly and become a cautionary tale.
A: Git merge conflicts! It's distributed computing™ in action.
A: Technically unlimited! Practically limited by your SSD and patience.
A: Science isn't about WHY, it's about WHY NOT!
A:
We welcome contributions! Especially:
Please don't:
MIT License - Because even jokes need legal protection.
This project is a parody and should not be used for any serious application. The author is not responsible for:
If you're actually considering using this in production, please seek help from:
Remember: If it's stupid but it works, it's still stupid.
Made with 😤 by someone who has spent too much time with Git
FAQs
Git as a Database - The most over-engineered database solution. Uses Git commit history as a storage engine because 'Git is immutable and distributed, so it's better than SQL.'
We found that gaad demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.