{"id":28974822,"url":"https://github.com/plcoster/fcc_rel_db_project1","last_synced_at":"2026-02-03T01:02:46.552Z","repository":{"id":299016109,"uuid":"545169496","full_name":"PLCoster/fcc_rel_db_project1","owner":"PLCoster","description":"FreeCodeCamp Relational Database Project 1: Celestial Bodies Database","archived":false,"fork":false,"pushed_at":"2022-10-03T23:57:15.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T06:32:58.396Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/PLCoster.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,"zenodo":null}},"created_at":"2022-10-03T22:48:37.000Z","updated_at":"2022-10-03T22:48:37.000Z","dependencies_parsed_at":"2025-06-14T06:33:02.925Z","dependency_job_id":"2c1da465-f1c6-47f5-881b-3c0c5befbfe8","html_url":"https://github.com/PLCoster/fcc_rel_db_project1","commit_stats":null,"previous_names":["plcoster/fcc_rel_db_project1"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/PLCoster/fcc_rel_db_project1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLCoster%2Ffcc_rel_db_project1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLCoster%2Ffcc_rel_db_project1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLCoster%2Ffcc_rel_db_project1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLCoster%2Ffcc_rel_db_project1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PLCoster","download_url":"https://codeload.github.com/PLCoster/fcc_rel_db_project1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PLCoster%2Ffcc_rel_db_project1/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261669006,"owners_count":23192362,"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":[],"created_at":"2025-06-24T12:07:06.911Z","updated_at":"2026-02-03T01:02:46.502Z","avatar_url":"https://github.com/PLCoster.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Free Code Camp: Relational Database Project 1\n\n## Celestial Bodies Database\n\nThe aim of this project was to build a small celestial bodies database using PostgreSQL.\n\nData for this project was sourced from [Wikipedia](https://www.wikipedia.org/).\n\n### Project Requirements:\n\n- **User Story #1:** You should create a database named `universe`\n\n- **User Story #2:** Be sure to connect to your database with `\\c universe`. Then, you should add tables named `galaxy`, `star`, `planet`, and `moon`\n\n- **User Story #3:** Each table should have a primary key\n\n- **User Story #4:** Each primary key should automatically increment\n\n- **User Story #5:** Each table should have a `name` column\n\n- **User Story #6:** You should use the `INT` data type for at least two columns that are not a primary or foreign key\n\n- **User Story #7:** You should use the `NUMERIC` data type at least once\n\n- **User Story #8:** You should use the `TEXT` data type at least once\n\n- **User Story #9:** You should use the `BOOLEAN` data type on at least two columns\n\n- **User Story #10:** Each \"star\" should have a foreign key that references one of the rows in `galaxy`\n\n- **User Story #11:** Each \"planet\" should have a foreign key that references one of the rows in `star`\n\n- **User Story #12:** Each \"moon\" should have a foreign key that references one of the rows in `planet`\n\n- **User Story #13:** Your database should have at least five tables\n\n- **User Story #14:** Each table should have at least three rows\n\n- **User Story #15:** The `galaxy` and `star` tables should each have at least six rows\n\n- **User Story #16:** The `planet` table should have at least 12 rows\n\n- **User Story #17:** The `moon` table should have at least 20 rows\n\n- **User Story #18:** Each table should have at least three columns\n\n- **User Story #19:** The `galaxy`, `star`, `planet`, and `moon` tables should each have at least five columns\n\n- **User Story #20:** At least two columns per table should not accept `NULL` values\n\n- **User Story #21:** At least one column from each table should be required to be `UNIQUE`\n\n- **User Story #22:** All columns named `name` should be of type `VARCHAR`\n\n- **User Story #23:** Each primary key column should follow the naming convention `table_name_id`. For example, the `moon` table should have a primary key column named `moon_id`\n\n- **User Story #24:** Each foreign key column should have the same name as the column it is referencing\n\n### Project Writeup:\n\nThe first Free Code Camp: Relational Databases project is a small relational database for celestial bodies. It contains four tables:\n\n- `galaxy` - containing galaxy names, descriptions, estimated masses and the type of galaxy (reference to galaxy_type table)\n  - `galaxy_type` - containing the name, symbol and description of four types of galaxy.\n- `star` - containing the names, mass, luminosity, temperature, radius and containing galaxy (reference to galaxy_id) of stars.\n- `planet` - containing the name, mass, radius, number of moons, and dwarf planet status for planets, as well as the parent star for each planet (reference to star_id)\n- `moon` - containing the name, description, radius, mass and volume of a moon, as well as its parent planet (reference to planet_id)\n\nNote that the database is not complete, particularly the moon table which only contains values in the 'name' column for each entry.\n\n### Usage\n\nThe database can be interacted with using `psql` in linux. First start up a PostgreSQL server using:\n\n`$sudo service postgresql start`\n\nLoad the database using:\n\n`$psql --dbname=postgres \u003c universe.sql`\n\nLog into the database using:\n\n`$psql --dbname=postgres`\n\nSave a dump of the database using:\n\n`$pg_dump -cC --inserts universe \u003e universe.sql`\n\nInstructions for building the project can be found at https://www.freecodecamp.org/learn/relational-database/build-a-celestial-bodies-database-project/build-a-celestial-bodies-database\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplcoster%2Ffcc_rel_db_project1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fplcoster%2Ffcc_rel_db_project1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fplcoster%2Ffcc_rel_db_project1/lists"}