Skip to content

Latest commit

Β 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 

Repository files navigation

🌌 Celestial Bodies Database (PostgreSQL)

PostgreSQL freeCodeCamp

This repository contains my SQL dump file (universe.sql) for the Build a Celestial Bodies Database project, completed as part of the freeCodeCamp Relational Database Certification.


πŸ“Œ Project Overview

The objective of this project was to design and build a normalized relational database using PostgreSQL modeling a celestial universe system (galaxies, stars, planets, and moons).

Key Features & Schema Design:

  • Built a multi-table relational schema: galaxy, star, planet, moon, and a custom reference table.
  • Enforced relational integrity using Primary Key (PK) and Foreign Key (FK) constraints.
  • Utilized various PostgreSQL data types and column constraints (NUMERIC, INT, TEXT, BOOLEAN, VARCHAR, NOT NULL, UNIQUE).
  • Executed queries and schema setup within a Bash/Linux environment using PostgreSQL CLI.

πŸ› οΈ How to Restore the Database

If you have PostgreSQL installed, you can restore and inspect this database schema locally:

# 1. Create a new database in PostgreSQL
createdb universe

# 2. Restore schema and data from the SQL dump file
psql -U postgres -d universe < universe.sql