{"id":18586719,"url":"https://github.com/oguzhanumutlu/photondb","last_synced_at":"2026-04-13T02:03:10.730Z","repository":{"id":63535145,"uuid":"568227692","full_name":"OguzhanUmutlu/photondb","owner":"OguzhanUmutlu","description":"As fast as a photon, as small-sized as a photon.","archived":true,"fork":false,"pushed_at":"2023-03-30T18:32:32.000Z","size":31,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T01:20:32.136Z","etag":null,"topics":["compact","database","fast","javascript","node","photon","small","sql","table"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OguzhanUmutlu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-11-19T21:08:58.000Z","updated_at":"2025-06-23T12:49:44.000Z","dependencies_parsed_at":"2024-11-13T15:00:37.869Z","dependency_job_id":null,"html_url":"https://github.com/OguzhanUmutlu/photondb","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":"0.11111111111111116","last_synced_commit":"2de8e31b4351c8d0af0916bace8576631bb3d8cd"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OguzhanUmutlu/photondb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OguzhanUmutlu%2Fphotondb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OguzhanUmutlu%2Fphotondb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OguzhanUmutlu%2Fphotondb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OguzhanUmutlu%2Fphotondb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OguzhanUmutlu","download_url":"https://codeload.github.com/OguzhanUmutlu/photondb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OguzhanUmutlu%2Fphotondb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31736723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-12T22:19:12.206Z","status":"online","status_checked_at":"2026-04-13T02:00:06.623Z","response_time":93,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compact","database","fast","javascript","node","photon","small","sql","table"],"created_at":"2024-11-07T00:38:23.885Z","updated_at":"2026-04-13T02:03:10.679Z","avatar_url":"https://github.com/OguzhanUmutlu.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Photon DB [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=PhotonDB:%20A%20fast%20and%20compact%20database\u0026hashtags=javascript,fast,node,sql,database,table,small,photon,compact\u0026url=https://github.com/OguzhanUmutlu/photondb)\n\nAs fast as a photon, as small-sized as a photon.\n\n## For further questions\n\nMy GitHub: [OguzhanUmutlu](https://github.com/OguzhanUmutlu)\n\nMy Discord: Oğuzhan#6561\n\n## Why photon?\n\n- ✨ Compared to other databases it is so small and compact! ✨\n- ✨ It's so fast! ✨\n- ✨ Supports multiple languages and executables for multiple operating systems! ✨\n\n### Blazingly fast!\n\n- Note: I know this is not related to sqlite, but I wanted to compare it to other famous databases.\n\n|                                                                | select 1 row | select 100000 rows | insert 100000 row |\n|----------------------------------------------------------------|--------------|--------------------|-------------------|\n| photondb                                                       | 1x           | 1x                 | 1x                |\n| [better-sqlite3](https://www.npmjs.com/package/better-sqlite3) | 2.63x slower | 11.5x slower       | 17.7x slower      |\n\n## Usage\n\n### Importing\n\n```js\nconst photon = require(\"photondb\");\n```\n\n### Opening your file\n\n```js\nconst db = photon(\"./myFile.pdb\");\n```\n\n### Running a command\n\n```js\ndb.query(\"CREATE TABLE helloWorld hi TEXT\");\n```\n\n## Commands\n\n### CREATE TABLE\n\n#### Syntax: CREATE TABLE \\\u003ctableName\u003e \\\u003crow-name\u003e \\\u003crow-properties\u003e, \\\u003crow-name\u003e \\\u003crow-properties\u003e, ...\n\n- Tip: You can add `IF NOT EXISTS` after `CREATE TABLE` so it doesn't throw an error if the table already exists.\n- Example: `CREATE TABLE IF NOT EXISTS workers id AUTOINCREMENT KEY, name, age NUMBER`\n\n#### Examples:\n\n- `CREATE TABLE workers id AUTOINCREMENT KEY, name, age NUMBER`\n- `CREATE TABLE salaries id NUMBER, salary NUMBER`\n\n#### Properties\n\n- `text` - It means the row's type is a string/text. Text type will be selected if nothing is given.\n- `number` - It means the row's type is a number. Can be negative or positive. Can be a floating number. If auto\n  increment property is selected the type will be chosen as number.\n- `auto-increment` - It means that whenever a new one is created its' value will be increased by one according to the\n  last added one. If auto increment option is given there is no need for its type to be given. Alias: \"autoincrement\"\n- `key` - It will make it a key which means you can't create two or more with the same value. Alias: \"unique\"\n- `default=Something` - It will put that value to that column if it was not specified from the query. Alias: \"def=Something\"\n\n### DELETE TABLE\n\n#### Syntax: DELETE TABLE \\\u003ctable\u003e\n\n#### Examples:\n\n- `DELETE TABLE workers`\n- `DELETE TABLE salaries`\n\n### INSERT INTO\n\n#### Syntax: INSERT INTO \\\u003ctable\u003e \\\u003crow-name\u003e \\\u003crow-value\u003e, \\\u003crow-name\u003e \\\u003crow-value\u003e, ...\n\n#### Examples:\n\n- `INSERT INTO workers name \"Jack\", age 22`\n- `INSERT INTO salaries id 1, salary 15000`\n\n### DELETE FROM\n\n#### Syntax: DELETE FROM \\\u003ctable\u003e WHERE \\\u003ccondition\u003e\n\n#### Examples:\n\n- `DELETE FROM workers WHERE name \"Jack\"`\n- `DELETE FROM salaries WHERE salary 15000`\n\n### SELECT FROM\n\n#### Syntax: SELECT FROM \\\u003ctable\u003e WHERE \\\u003ccondition\u003e\n\n#### Examples:\n\n- `SELECT FROM workers WHERE name \"Jack\", age 22`\n- `SELECT FROM salaries WHERE salary 15000`\n\n### UPDATE FROM\n\n#### Syntax: UPDATE FROM \\\u003ctable\u003e WHERE \\\u003ccondition\u003e SET \\\u003cvalues\u003e\n\n#### Examples:\n\n- `UPDATE FROM workers WHERE \u003ccondition\u003e SET \u003cvalues\u003e`\n- `UPDATE FROM salaries SET salary 30000`\n\n# TODO\n\n- Implementing to Rust\n- Implementing to PHP","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzhanumutlu%2Fphotondb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foguzhanumutlu%2Fphotondb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foguzhanumutlu%2Fphotondb/lists"}