Create a database of planetary systems leveraging PostgreSQL.
Here is a PostgreSQL database of celestial bodies that was built as part of the FreeCodeCamp Relational Databases Beta Certificate course.
The goal of the project was to create a sample database that includes the main celestial bodies such as galaxies, stars, planets, and moons, along with an additional table for different planet types and their descriptions.
-
The database includes a separate table for each type of celestial body, as well as a table for planet types.
-
Each table includes relevant information about the celestial bodies, such as name, distance, radius, and orbital period.
-
Relationships between the tables were established to allow for easier navigation and querying of the data.
-
The relationships follow the hierarchy of celestial bodies:
- π GALAXIES contain β [β]
- β STARS contain β [π]
- π PLANETS contain β [π]
To create the database, research was conducted to identify the main variables to track for each celestial body. The research was based on sources such as Wikipedia and astronomy websites, and focused on values such as mean radius, distance in light years, and orbital period. Due to a lack of information or distance from some celestial bodies, some values in the database are null, and others were rounded to 2 or 3 decimal places.
DRAW.IO was used to replicate the database.
Data Conceptual Model (DCM)
The relational database diagram for the celestial bodies database was created by replicating the database on DRAW.IO The diagram provides a visual representation of the relationships between the tables and the structure of the database.
To use the celestial bodies database, simply import the SQL script into PostgreSQL or any other compatible database management system. Once imported, you can query the data to retrieve information about celestial bodies and their characteristics.
Contributions to this project are not currently being accepted. However, if you notice any errors or have suggestions for improvements, please feel free to open an issue or contact me directly.
This project is licensed under the MIT license, which means you can use, modify, and distribute the code for any purpose, as long as you include the original copyright and license notice.