{"id":17694739,"url":"https://github.com/avojak/libretrodb-sqlite","last_synced_at":"2025-04-23T03:08:29.913Z","repository":{"id":74884658,"uuid":"482062091","full_name":"avojak/libretrodb-sqlite","owner":"avojak","description":"Reformatted version of the Libretro database (i.e. RetroArch .rdb files) as a single SQLite database file","archived":false,"fork":false,"pushed_at":"2023-11-07T02:28:54.000Z","size":42,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-18T08:24:36.500Z","etag":null,"topics":["libretro","retroarch","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/avojak.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-04-15T19:20:19.000Z","updated_at":"2025-01-08T18:48:00.000Z","dependencies_parsed_at":"2023-11-07T05:20:23.738Z","dependency_job_id":null,"html_url":"https://github.com/avojak/libretrodb-sqlite","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Flibretrodb-sqlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Flibretrodb-sqlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Flibretrodb-sqlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/avojak%2Flibretrodb-sqlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/avojak","download_url":"https://codeload.github.com/avojak/libretrodb-sqlite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250360488,"owners_count":21417721,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["libretro","retroarch","sqlite"],"created_at":"2024-10-24T13:49:34.879Z","updated_at":"2025-04-23T03:08:29.897Z","avatar_url":"https://github.com/avojak.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://img.shields.io/badge/size-35%20MB-blue\"\u003e\u003c/img\u003e\n\u003cimg src=\"https://img.shields.io/badge/compressed%20size-14%20MB-blue\"\u003e\u003c/img\u003e\n\n# SQLite Libretro DB\n\nIn some cases, client applications may find a SQLite database easier to consume than the Libretro `.rdb` files. This project provides\nthe same content* from the Libretro RetroArch database in a single SQLite database file.\n\n\\* *Some data is excluded, such as the filesize of the ROM, and all checksums except for MD5*\n\n***Important note:*** The conversion tool here also does some basic deconfliction when there are multiple records for the same ROM MD5 checksum.\nThe underlying assumption is that if two ROMs have the same checksum, they're the same, and the metadata should be merged in favor of non-null\nvalues. The primary use-case is for client applications to be able to query the database by MD5 checksum of a ROM file, so keep in mind that \nthis mindset informed the database schema and how the utility decides which data is duplicated.\n\n## Usage\n\nThe pre-built database can be downloaded from the latest GitHub release.\n\nTo build from scratch:\n\n```bash\n$ make all\n```\n\nThe build will create both the raw `.sqlite` database file, as well as a compressed `.tgz` version:\n\n```bash\nbuild/libretrodb.sqlite\nbuild/libretrodb.sqlite.tgz\n```\n\n## Output Schema\n\n### `games`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| serial_id | TEXT |\n| developer_id | INTEGER |\n| publisher_id | INTEGER |\n| rating_id | INTEGER |\n| users | INTEGER |\n| franchise_id | INTEGER |\n| release_year | INTEGER |\n| release_month | INTEGER |\n| region_id | INTEGER |\n| genre_id | INTEGER |\n| display_name | TEXT |\n| full_name | TEXT |\n| boxart_url | TEXT |\n| platform_id | INTEGER |\n\n### `roms`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| serial_id | TEXT |\n| name | TEXT |\n| md5 | TEXT |\n\n### `developers`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n### `publishers`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n### `ratings`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n### `franchises`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n### `regions`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n### `genres`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n### `platforms`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n### `manufacturers`\n\n| Column | Data Type |\n| ------ | --------- |\n| id | INTEGER PRIMARY KEY |\n| name | TEXT |\n\n## Sample Query\n\nSample query for data based on a ROM file with the MD5 hash of `27F322F5CD535297AB21BC4A41CBFC12`:\n\n```sql\nSELECT games.serial_id,\n\tgames.release_year,\n\tgames.release_month,\n\tgames.display_name,\n\tgames.users,\n\tdevelopers.name as developer_name,\n\tpublishers.name as publisher_name,\n\tratings.name as rating_name,\t\n\tfranchises.name as franchise_name,\n\tregions.name as region_name,\n\tgenres.name as genre_name,\n\troms.name as rom_name,\n\troms.md5 as rom_md5,\n\tplatforms.name as platform_name,\n\tmanufacturers.name as manufacturer_name\nFROM games\n\tLEFT JOIN developers ON games.developer_id = developers.id\n\tLEFT JOIN franchises ON games.franchise_id = franchises.id\n\tLEFT JOIN publishers ON games.publisher_id = publishers.id\n\tLEFT JOIN ratings ON games.rating_id = ratings.id\n\tLEFT JOIN genres ON games.genre_id = genres.id\n\tLEFT JOIN platforms ON games.platform_id = platforms.id\n\t\tLEFT JOIN manufacturers ON platforms.manufacturer_id = manufacturers.id\n\tLEFT JOIN regions ON games.region_id = regions.id\n\tINNER JOIN roms ON games.serial_id = roms.serial_id\nWHERE roms.md5 = \"27F322F5CD535297AB21BC4A41CBFC12\";\n```\n\nOutput:\n\n| serial_id | release_year | release_month | display_name | developer_name | franchise_name | region_name | genre_name | rom_name | rom_md5 | platform_name | manufacturer_name |\n| --------- | ------------ | ------------- | ------------ | -------------- | -------------- | ----------- | ---------- | -------- | ------- | ------------- | ----------------- |\n| 41575245 | 2001 | 9 | Advance Wars | Intelligent Systems | Advance Wars | USA | Strategy | Advance Wars (USA).gba | 27F322F5CD535297AB21BC4A41CBFC12 | Game Boy Advance | Nintendo |\n\n## Artwork\n\nUp to three types of artwork can be retrieved:\n\n1. Cover/box art (i.e. `Named_Boxarts`)\n2. In-game snapshots (i.e. `Named_Snaps`)\n3. Title screens (i.e. `Named_Titles`)\n\nThe pre-URL-encoded format for a request for artwork is:\n\n```\nhttp://thumbnails.libretro.com/[[MANUFACTURER - ]PLATFORM]/[TYPE]/[DISPLAY_NAME].png\n```\n\nFor example, to retrieve the box art for Advance Wars on the Game Boy Advance:\n\n```\nhttp://thumbnails.libretro.com/Nintendo%20-%20Game%20Boy%20Advance/Named_Boxarts/Advance%20Wars%20%28USA%29.png\n```\n\n## License\n\nThis data is provided under the same license as the original data files: https://github.com/libretro/libretro-database/blob/master/COPYING\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favojak%2Flibretrodb-sqlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Favojak%2Flibretrodb-sqlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Favojak%2Flibretrodb-sqlite/lists"}