Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/winterrdog/sqlyte-db
A small database like SQLite that can do CRU( create, read & update ) and store data as B-Trees. Clearly written in C.
https://github.com/winterrdog/sqlyte-db
c data-structures database sql
Last synced: about 20 hours ago
JSON representation
A small database like SQLite that can do CRU( create, read & update ) and store data as B-Trees. Clearly written in C.
- Host: GitHub
- URL: https://github.com/winterrdog/sqlyte-db
- Owner: winterrdog
- License: mit
- Created: 2024-05-04T06:59:31.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-07-04T10:55:25.000Z (7 months ago)
- Last Synced: 2024-11-27T19:28:50.681Z (2 months ago)
- Topics: c, data-structures, database, sql
- Language: C
- Homepage:
- Size: 97.7 KB
- Stars: 6
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sqlyte-db
A simple database like SQLite that can do stuff. It's not a basic one but rather intermediate-level project. Clearly written in C
## Usage
- Clone the repository
```sh
git clone https://github.com/winterrdog/sqlyte-db.git
```- Compile the source code
```sh
./compile.sh
```- Run the executable
```sh
./sqlyte-db
```- For now the database supports 2 SQL commands:
- `insert` -- inserts / updates data into the database
- `select` -- selects data from the database( _only supports `*` for now meaning it selects all data and prints it out_ )- `.exit` -- exits the database
- The database is fully persistent, meaning that you can exit the database and come back to it later and the data will still be there.
To get more help on how to use the database, type `.help` in the database shell.
- You can also view it in action [here](https://asciinema.org/a/663557)
[![asciicast](https://asciinema.org/a/663557.svg)](https://asciinema.org/a/663557)
_if you don't want to clone the repository_.## Testing
- Make sure you have `node.js` installed on your machine
- Also make sure you have `jest` installed _globally_```sh
npm install -g jest
```- Only after is when you can test the database using `node.js`' `jest` like so:
```sh
jest
```Make sure you're at the root of the project directory when you run the command above.
## NOTE
- I've attached a compiled binary for Linux users. If you're on a different platform, you'll have to compile the source code yourself. The code is Unix-based and may not work on `Windows`( _unless you run `./compile.sh` in a WSL environment, of course_ ). It can compile on `MacOS` but I haven't tested it yet but it **should** work. In case you have forgotten how to compile the source code, refer to the `Usage` section above.