Creation of a relational PostgreSQL database of celestial bodies built via command line in a Linux environment to practice schema design and SQL fundamentals.
This project, completed as part of the freeCodeCamp Relational Database certification, demonstrates the design and implementation of a relational PostgreSQL database of celestial bodies. Built entirely via the command line in a vitual Linux environment, the database models galaxies, stars, planets, and moons under strict relational principles.
- Design and implement a relational database schema for celestial bodies.
- Apply primary and foreign key constraints to enforce relationships.
- Populate tables with realistic sample data.
- Demonstrate use of multiple data types (
INT,NUMERIC,TEXT,BOOLEAN). - Enforce integrity constraints (
NOT NULL,UNIQUE,VARCHAR).
-
Schema Design
- Created database
universewith at least 5 tables (galaxy,star,planet,moon, plus supporting tables). - Defined primary keys with auto-increment and consistent naming (
table_name_id). - Established foreign key relationships.
- Created database
-
Data Types & Constraints
- Used a mix of
INT,NUMERIC,TEXT, andBOOLEAN. - Applied
NOT NULLandUNIQUEconstraints. - Standardized
namecolumns asVARCHAR.
- Used a mix of
-
Population & Validation
- Inserted minimum required 3 rows per table, plus table‑specific requirements:
galaxytable: 6 rowsstartable: 6 rowsplanettable: 12 rowsmoontable: 20 rows
- Added a
namecolumn in each table and ensured minimum required 3 columns per table, plus table‑specific requirements:galaxytable: 5 columnsstartable: 5 columnsplanettable: 5 columnsmoontable: 5 columns
- Verified schema integrity and relational consistency.
- Inserted minimum required 3 rows per table, plus table‑specific requirements:
- Practiced schema design and constraint enforcement in PostgreSQL.
- Strengthened command‑line workflow skills in a Linux environment.
- Gained experience translating abstract requirements into a working relational model.