{"id":18772472,"url":"https://github.com/eftec/example-relationaldatabase","last_synced_at":"2026-01-27T07:03:54.660Z","repository":{"id":71041649,"uuid":"277159611","full_name":"EFTEC/example-relationaldatabase","owner":"EFTEC","description":"It is a library","archived":false,"fork":false,"pushed_at":"2020-07-05T00:01:51.000Z","size":589,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T17:30:44.284Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.eftec.cl","language":"TSQL","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/EFTEC.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":"2020-07-04T17:52:30.000Z","updated_at":"2024-09-23T21:04:03.000Z","dependencies_parsed_at":"2023-06-07T07:45:20.017Z","dependency_job_id":null,"html_url":"https://github.com/EFTEC/example-relationaldatabase","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EFTEC/example-relationaldatabase","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFTEC%2Fexample-relationaldatabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFTEC%2Fexample-relationaldatabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFTEC%2Fexample-relationaldatabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFTEC%2Fexample-relationaldatabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EFTEC","download_url":"https://codeload.github.com/EFTEC/example-relationaldatabase/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EFTEC%2Fexample-relationaldatabase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28807098,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T06:25:51.065Z","status":"ssl_error","status_checked_at":"2026-01-27T06:25:50.640Z","response_time":168,"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":[],"created_at":"2024-11-07T19:29:11.951Z","updated_at":"2026-01-27T07:03:54.644Z","avatar_url":"https://github.com/EFTEC.png","language":"TSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Example of a minimal relational database\nIt is a minimal relational database for MySQL and Sql Server\n\n## Objectives of the database\n\n* To have a database with different kind of relations of tables.\n  * MANY TO ONE\n  * ONE TO MANY\n  * MANY TO MANY\n  * ONE TO ONE\n  * MANY TO MANY\n  * (optional) MANY TO ONE \u0026 MANY TO ONE \u0026 ONE TO MANY\n* Minimal information. This database has at most 5 rows of data.\n* It has a few nulls\n* All tables have the prefix \"**Table**\". \n* All Primary Keys (PKs) are of the type **int** and they have a postfix \"**PK**\"\n  * Some of them are identity.\n* All Foreign Keys (FKs) are of the type **int** and they have a postfix \"**FK**\"\n* The table **TableParent** showcase the next types\n  * int\n  * varchar\n  * decimal\n  * datetime\n* The table **TableParent** has the next keys\n  * Primary Key\n  * Foreign Keys\n  * Unique Key\n  * Regular Key\n\n## Description\n\nThe main table is the table **TableParent**. It could be used as the initial table.\n\n\n\n## Tables\n\n| Table                | Relation with Parent                    | Example                                                      |\n| -------------------- | --------------------------------------- | ------------------------------------------------------------ |\n| TableParent          | -                                       | -                                                            |\n| TableChild           | Many To One                             | TableParent - TableChild                                     |\n| TableGrandChild      | Many to One - Many to One               | TableParent - TableChild - TableGrandChild                   |\n| TableGrandChildTag   | Many to One - Many to One - One to Many | TableParent - TableChild - TableGrandChild - TableGrandChildTag |\n| TableParentxCategory | Many to Many                            | TableParent - TableParentxCategory - TableCategory           |\n| TableCategory        | Many to Many                            | TableParent - TableParentxCategory - TableCategory           |\n| TableParentExt       | One to One                              | TableParent - TableParentExt                                 |\n\n\u003e Note: **TableParent** doesn't have a One To Many relation but **TableChild** has it.\n\u003e\n\u003e Note: **TableParent** is related two times with the **TableChild**\n\n## Diagram\n\n![img/diagram.png](img/diagram.png)\n\n## Mysql Install\n\n[mysql/mysql.sql](mysql/mysql.sql)\n\nRun the next script. It will create the database called **testdb**\n\n\u003e This database is compatible with MySQL 8.0 and higher. It could run with MySQL 5.x but it could require to change the encoding.\n\n## Sql Server Install\n\nRecover the next backups.\n\nFor Sql Server 2012 and higher\n\n[sqlserver/testdb2012.bak](sqlserver/testdb2012.bak)\n\nFor Sql Server 2019 and higher\n\n[sqlserver/testdb2019.bak](sqlserver/testdb2019.bak)\n\n## Copyright\n\nMIT License\n\nCopyright (c) 2020 Escuela de Formación Técnica Chile SPA\n\n\n\n## Changelog\n\n* 1.0 2020-07-04 First version\n\n  ","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feftec%2Fexample-relationaldatabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feftec%2Fexample-relationaldatabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feftec%2Fexample-relationaldatabase/lists"}