{"id":24510638,"url":"https://github.com/chriseaton/sample-database","last_synced_at":"2026-04-25T11:32:56.343Z","repository":{"id":97906598,"uuid":"150447389","full_name":"chriseaton/sample-database","owner":"chriseaton","description":"A long-term supported sample dataset for file and database unit testing and validation. Simple, straight-forward, raw data shared across formats.","archived":false,"fork":false,"pushed_at":"2018-10-27T00:07:35.000Z","size":17417,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-06-13T11:07:30.014Z","etag":null,"topics":["data","database","examples","flat-file","samples","schema","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chriseaton.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":"2018-09-26T15:19:23.000Z","updated_at":"2018-10-27T00:07:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"73eac3f3-c3fc-4154-98b9-bf7eae1c4934","html_url":"https://github.com/chriseaton/sample-database","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chriseaton/sample-database","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriseaton%2Fsample-database","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriseaton%2Fsample-database/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriseaton%2Fsample-database/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriseaton%2Fsample-database/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chriseaton","download_url":"https://codeload.github.com/chriseaton/sample-database/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chriseaton%2Fsample-database/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32261110,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-25T09:15:33.318Z","status":"ssl_error","status_checked_at":"2026-04-25T09:15:31.997Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["data","database","examples","flat-file","samples","schema","unit-testing"],"created_at":"2025-01-22T00:30:03.011Z","updated_at":"2026-04-25T11:32:51.336Z","avatar_url":"https://github.com/chriseaton.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sample Database\nThis project has one goal: provide a consistent set of data that can be used across data storage formats for testing.\nTo achieve this, this project contains 2 components:\n\n1. A generator to create a schema-consistent set of randomized data.\n2. A long-term generated set of data with a solid architecture that can be relied on for unit-testing down to specific values.\n\nBoth the generator and the long-term dataset (\"LTD\") provide an output in a number of data storage formats using the long-term schema (LTS). Contributors are welcome to include additional formats of the LTD and update the generator to support additional outputs.\n\n## Long-Term Schema \u0026 Dataset\nThis project leverages a schema for all data that ensures consistency for the life of the project. No columns/fields, data types, or constraints will *ever* be removed or altered once established in an official version. This helps guarantee this project can be used for things such as unit-testing. The schema is intentionally kept relatively small.\n\nFor more information, see the [Architecture](#Architecture) section below.\n\nThe long-term dataset is a defined set of data that is [versioned by release name](#Current-Releases) and supported for the life of this project. Unit-tests based on these dataset releases are able to rely on the exising configuration long-term, and in general each LTD supports as many data file formats and database engines as reasonably possible.\n\n### Updates\nAny schema or data changes to the LTS will result in a new LTD package, maintained in a seperate directory from the prior LTD. This ensures users can continue to rely on a previous LTD for their tests without any changes. Additional file formats may be added to existing releases over time.\n\n#### Current Releases\n| # | Name | Release Date |\n| - | ---- | ------------ |\n| 1 | [Ammolite](./LTD/Ammolite) | TBD |\n\n## Generator\nThe generator outputs randomized data using any LTS release that you can utilize or modify as needed for your project. \n\n## Supported Databases \u0026 Files\nThe goal of the project is to support a wide array of data file and database formats.\n\n### Databases\nDatabase scripts do not include any \"create database\" operations (unless required). You will need to create a database\nfirst and then run the appropriate script to create the schema and data.\n\n| Name | LTD Available | Generator |\n| ---- | ------------- | --------- |\n| [CSV](./LTD/Ammolite/CSV/) | Yes | Yes |\n| [JSON](./LTD/Ammolite/JSON) | Yes | Yes |\n| [Microsoft SQL Server](./LTD/Ammolite/MSSQL) | Yes | Yes |\n| [MySQL](./LTD/Ammolite/MySQL) | Yes | Yes |\n| [Postgres](./LTD/Ammolite/Postgres) | Yes | Yes |\n| [SQLite 3](./LTD/Ammolite/SQLite) | Yes | Yes |\n| [TOML](./LTD/Ammolite/TOML) | Yes | Yes |\n| [TSV](./LTD/Ammolite/TSV) | Yes | Yes |\n| [YAML](./LTD/Ammolite/YAML) | Yes | Yes |\n| [XML](./LTD/Ammolite/XML) | Yes | Yes |\n\n## Architecture\nThis architecture is intentionally kept simple - we are not considering stored procedures or functions.\n\nSome database engines or file formats may not support all features (like views) - in such case we will use a similar feature,\nif possible, to create a similar result. Not all column contraints or features may be supported by all file formats.\n\n### Time-stamps\nCertain tables utilize a \"DateDeleted\" Date/Time column - this column acts as a \"soft-delete\" flag for the record. \nWhether this is great architecture or not typically depends on your needs, but because it's often used we're including\nit on the following tables: Customers, Products, and Users.\n\nIn file-based formats, where a column is a Binary data type, we will use a base-64 encoded string.\n\nDatabases will use foreign-key constraints, indexes, and primary-keys whenever possible.\n\n### Schema\n\n1. #### [Addresses](./LTD/Ammolite/Markdown/Addresses.md)  \n    Contains geographical US-based addresses.    \n    Addresses are semi-accurrate with cities, states, postal-codes, and countries matching real combinations. Latitude and longitude should match the postal code or city average geographical location. Line1 \u0026 Line2 are randomly crafted and do not represent real addresses.\n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | ID | Integer | Yes | No | |\n    | Line1 | String | No | No | |\n    | Line2 | String | No | Yes | |\n    | City | String | No | Yes | |\n    | PostalCode | String | No | Yes | |\n    | StateProvince | String | No | Yes | |\n    | Country | String | No | Yes | |\n    | Latitude | Floating-Point | No | Yes | This value cooresponds to the latitude by postal-code or city. |\n    | Longitude | Floating-Point | No | Yes | This value cooresponds to the longitude by postal-code or city. |\n1. #### [Customers](./LTD/Ammolite/Markdown/Customers.md)  \n    Contains customer (person) information.    \n    Due to the low amount of seed content, the photo data is likely duplicated across multiple customers.\n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | ID | Integer | Yes | No | |\n    | FirstName | String | No | No | |\n    | LastName | String | No | No | |\n    | Suffix | String | No | Yes | |\n    | CompanyName | String | No | Yes | |\n    | Title | String | No | Yes | |\n    | Notes | String | No | Yes | |\n    | AccountNumber | Integer | No | Yes | |\n    | Photo | Binary | No | Yes | |\n    | DateCreated | Date/Time | No | No | |\n    | DateUpdated | Date/Time | No | Yes | |\n    | DateDeleted | Date/Time | No | Yes | |\n1. #### [Orders](./LTD/Ammolite/Markdown/Orders.md)    \n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | ID | Integer | Yes | No | |\n    | CustomerID | Integer | Foreign | No | |\n    | AddressID | Integer | Foreign | No | |\n    | Status | Integer | No | No | |\n    | PaymentMethod | String | No | Yes | |\n    | Weight | Floating-Point | No | Yes | |\n    | Shipped | Boolean | No | Yes | |\n    | TrackingNumber | String | No | Yes | |\n    | DateShipped | Date | No | Yes | |\n    | TimeShipped | Time | No | Yes | |\n1. #### [OrderProducts](./LTD/Ammolite/Markdown/OrderProducts.md)    \n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | OrderID | Integer | Foreign | No | |\n    | ProductID | Integer | Foreign | No | |\n    | Quantity | Integer | No | No | |\n    | UnitCost | Floating-Point | No | No | |\n    | UnitPrice | Floating-Point | No | No | |\n    | TotalCost | Floating-Point | No | No | |\n    | TotalPrice | Floating-Point | No | No | |\n1. #### [Products](./LTD/Ammolite/Markdown/Products.md)    \n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | ID | Integer | Yes | No | |\n    | Name | String | No | No | |\n    | ScanCode | String | No | Yes | |\n    | Cost | Floating-Point | No | No | |\n    | Price | Floating-Point | No | No | |\n    | ImageURL | String | No | Yes | |\n    | DateCreated | Date/Time | No | No | |\n    | DateUpdated | Date/Time | No | Yes | |\n    | DateDeleted | Date/Time | No | Yes | |\n1. #### [Users](./LTD/Ammolite/Markdown/Users.md)    \n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | ID | Integer | Yes | No | |\n    | RoleID | Integer | Foreign | No | |\n    | UserName | String | No | No | |\n    | Password | String | No | No | Passwords are stored as the [SHA1](https://en.wikipedia.org/wiki/SHA-1) hexidecimal hash digest of \"password\" concatenated with the row ID (e.g.: \"password33\" on a user with ID 33) |\n    | DateCreated | Date/Time | No | No | |\n    | DateUpdated | Date/Time | No | Yes | |\n    | DateDeleted | Date/Time | No | Yes | |\n1. #### [Roles](./LTD/Ammolite/Markdown/Roles.md)    \n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | ID | Integer | Yes | No | |\n    | Name | String | No | No | The name will always be \"Administrator\" with role on ID equalling 1, \"User\" on ID equalling 2, and \"Visitor\" on ID equalling 3. |\n1. #### [Theme](./LTD/Ammolite/Markdown/Theme.md)    \n    ##### Columns:\n    | Name | Type | Key | Nullable | Notes |\n    | ---- | ---- | --- | -------- | ----- |\n    | ID | Integer | Yes | No | |\n    | Name | String | No | No | |\n    | HexCode | String | No | No | |\n\n## Contributing\nWant to provide a fix or provide a new format? Just create a merge request with the change.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriseaton%2Fsample-database","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchriseaton%2Fsample-database","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriseaton%2Fsample-database/lists"}