An open API service indexing awesome lists of open source software.

https://github.com/bazilsuhail/flexibase

FlexiBase Shell (a close to real database inspired by MongoDb) that is a testament to the power of C++ and custom-built data structures from scratch.
https://github.com/bazilsuhail/flexibase

btree-indexes custom database database-management hashmaps query-language

Last synced: about 2 months ago
JSON representation

FlexiBase Shell (a close to real database inspired by MongoDb) that is a testament to the power of C++ and custom-built data structures from scratch.

Awesome Lists containing this project

README

          

# FlexiBase Shell

#### Welcome to FlexiBase Shell, a simple and efficient database management tool I created as a semester project in my 3rd semster under supervision of [Dr. Khawaja Umar Suleman](https://www.linkedin.com/in/umar-suleman/).

FlexiBase Shell is a lightweight, efficient database management tool designed for simplicity and performance. Built from the ground up, all database structures, including indexing, retrieval, and key-value storage, are custom-designed to meet the needs of modern data management.

### 🤖 Tech Stack

C++
Data Structures and Algorithms
B-Tree
Hashmaps

### Live Demo
Check out the all details of this shell at [Flexibase](https://entitysafe.netlify.app/pages/AppList/-O2Lqfm-dWrxvRaaP_pW).

### Key Features
- Custom-Built Structures: All data structures, including B-trees for indexing and hashmaps for key-value search, are implemented from scratch to ensure optimal performance and flexibility.
- Intuitive Shell Commands: FlexiBase Shell offers an easy-to-use command-line interface, allowing users to perform various database operations efficiently.
- Efficient Data Management: With B-trees for indexing and hashmaps for key-value searches, FlexiBase Shell ensures fast and reliable data retrieval.
- Compact and Detailed Views: Users can display data in both compact and detailed formats, making it easier to manage and analyze stored information.

## Tech Stack

**Language:** C++ **_(all data-structures build from scratch)_**

## Installation
Clone the repository

```bash
git clone https://github.com/BazilSuhail/FlexiBase.git
cd my-project
```
Then compile the **Source.cpp** with any Compiler and the shell will appear

## Shell Commands

At first you can type **help** in the shell to know about the offered query commands

### Create a database
```bash
create
```
#### Example:
```bash
create students_db
```

### Use a Database
```bash
Use a Database
```
#### Example:
```bash
use
```
### Exit the Database
```bash
exit db

```
### Insert a New Object in Databse
```bash
db.insert([key1: value1], [key2: value2], ...)

```
#### Example:
```bash
db.insert([Name: John], [Semester: 2], [CGPA: 3.45], [University: MIT], [Status: Current])
```
### Insert or Update a Key-Value Pair in a Document
```bash
db.insertkey(, , )

```
#### Example:
```bash
db.insertkey(1055, Address, 123 Main St)

```
### Delete a Key-Value Pair in a Document
```bash
db.deletekey(, )
```
#### Example:
```bash
db.deletekey(1055, Address)
```
### Find an Object by ID
```bash
db.find()

```
#### Example:
```bash
db.find(1055)
```

### Show All Objects (Compact Format)
```bash
db.show()
```
### Show All Objects (Detailed Format)
```bash
db.show.pretty()
```
### Find Objects by Key-Value Pair
```bash
db.findbyvalue(, )

```
#### Example:
```bash
db.findbyvalue(Name, John)

```