Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/kerciu/sqlite-clone

๐Ÿ“’ Simple Database in C ๐Ÿš€ โ€” A lightweight and intuitive database system built in C ๐Ÿ—ƒ๏ธ. This project covers essential database operations and is designed to be easy to understand and use. ๐Ÿ’ก๐Ÿ”
https://github.com/kerciu/sqlite-clone

c database database-management memory-management scratch-implementation sqlite

Last synced: 5 days ago
JSON representation

๐Ÿ“’ Simple Database in C ๐Ÿš€ โ€” A lightweight and intuitive database system built in C ๐Ÿ—ƒ๏ธ. This project covers essential database operations and is designed to be easy to understand and use. ๐Ÿ’ก๐Ÿ”

Awesome Lists containing this project

README

        

# ๐Ÿ—ƒ๏ธ KacperSQL

KacperSQL is a simple SQL database engine written in C. It allows creating, modifying, and querying a database. ๐Ÿ–ฅ๏ธ๐Ÿ’พ

## ๐Ÿ“š Table of Contents

- [Project Description](#project-description)
- [Installation](#installation)
- [Usage](#usage)
- [Available Commands](#available-commands)
- [Examples](#examples)

## ๐Ÿ“œ Project Description

KacperSQL is a database project written in C that implements basic SQL operations such as inserting, updating, deleting, and selecting data. It also supports table management and helper commands. ๐Ÿ› ๏ธ๐Ÿ”

## ๐Ÿ”ง Installation

1. Clone the repository:

```bash
git clone https://github.com/Kerciu/sqlite-clone.git
```

2. Navigate to the project directory:

```bash
cd kacpersql
```

3. Build the project using Makefile:

```bash
make
```

## ๐Ÿƒ Usage

1. Run the program as it is or choose a working file:

```bash
./KacperSql
```

```bash
./KacperSql
```

2. Enter a command to open or create a table:

```sql
OPEN TABLE
```

3. Use the available SQL commands to interact with the database. ๐Ÿ“‹

## ๐Ÿ› ๏ธ Available Commands

### `HELP`

Displays available commands and details for each command:

- `INSERT `: Inserts a new row into the table. ๐Ÿ†•
- `SELECT *`: Selects all rows from the table. ๐Ÿ”
- `SELECT LIMIT `: Selects rows up to the specified id. ๐Ÿ“Š
- `SELECT BETWEEN AND `: Selects rows between two ids. ๐Ÿ“ˆ
- `DELETE `: Deletes the row with the specified id. โŒ
- `UPDATE `: Updates the row with the specified id. โœ๏ธ
- `OPEN TABLE `: Opens an existing table or creates a new one with the specified file name. ๐Ÿ“‚
- `DROP`: Clears the currently working table. ๐Ÿ—‘๏ธ

### `HELP `

Displays details for a specific command. โ“

## ๐Ÿ“‘ Examples

1. **Creating a Table:**

```sql
OPEN TABLE
```

2. **Inserting a Record:**

```sql
INSERT 1 Kacper [email protected]
```

3. **Selecting Records:**

```sql
SELECT *
```

4. **Updating a Record:**

```sql
UPDATE 1 Kacper [email protected]
```

5. **Deleting a Record:**

```sql
DELETE 1
```

## ๐Ÿ“ License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. ๐Ÿ“œ

## ๐Ÿ“ฌ Contact

If you have any questions, feedback, or suggestions, feel free to reach out through the following channels:

- **Author**: [Kacper Gรณrski](mailto:[email protected]) ๐Ÿง‘โ€๐Ÿ’ป
- **LinkedIn**: [Kacper Gรณrski](https://www.linkedin.com/in/kacper-gorski-se/) ๐ŸŒ
- **Instagram**: [@kxcper.gorski](https://www.instagram.com/kxcper.gorski/) ๐Ÿ“ธ
- **X**: [@Kerciuu](https://x.com/Kerciuu) ๐Ÿฆ
- **GitHub**: [Kerciu](https://github.com/Kerciu) ๐Ÿง‘โ€๐Ÿ’ป
- **Support**: For technical support, please email [[email protected]](mailto:[email protected]) ๐Ÿ“ง

For issues, please open a [GitHub Issue](https://github.com/Kerciu/sqlite-clone/issues). ๐Ÿš€

---