Skip to content

πŸš€ PostgreSQL database schema for managing space missions, including astronaut records, spacecraft, and mission logs.

Notifications You must be signed in to change notification settings

Hifza-Khalid/DatabaseProjects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

4 Commits
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ Space Management System Database

πŸ“Œ Overview

The Space Management System database is designed to efficiently manage πŸš€ spacecraft, πŸ›°οΈ missions, 🌌 space stations, and astronaut assignments.


πŸ› οΈ Technologies Used

  • 🐘 PostgreSQL (Database)
  • πŸ“œ SQL Queries (Schema & Data Management)

πŸ“‚ Database Schema

The database consists of the following tables:

1️⃣ πŸš€ Spaceships – Stores information about spacecraft.
2️⃣ πŸ›°οΈ Missions – Details of space missions.
3️⃣ πŸ‘¨β€πŸš€ Astronauts – Information about astronauts.
4️⃣ 🏒 Space Stations – Data about space stations.
5️⃣ πŸ”— Assignments – Links astronauts to missions.


βš™οΈ Setup Instructions

Follow these steps to set up the database:

1️⃣ Clone the repository

git clone https://github.com/your-repo/space-management-db.git
cd space-management-db

2️⃣ Install PostgreSQL (if not installed)

3️⃣ Create the Database

CREATE DATABASE space_management;

4️⃣ Run Schema File

psql -d space_management -f schema.sql

5️⃣ Insert Sample Data (Optional)

psql -d space_management -f seed.sql

πŸ“Œ Example Queries

Here are some example queries you can run:

βœ… Get all astronauts assigned to a mission

SELECT a.name FROM Astronauts a 
JOIN Assignments asg ON a.id = asg.astronaut_id 
WHERE asg.mission_id = 1;

βœ… List all active missions

SELECT * FROM Missions WHERE status = 'Active';

βœ… Find spaceships launched after 2020

SELECT * FROM Spaceships WHERE launch_year > 2020;

🀝 Contribution Guidelines

Want to contribute? Follow these steps:

πŸ”Ή Fork the repository
πŸ”Ή Create a new branch (git checkout -b feature-name)
πŸ”Ή Commit your changes (git commit -m "Added a new feature")
πŸ”Ή Push and create a pull request


πŸ“§ Contact

For any queries, feel free to reach out:

πŸ“© Email:[email protected] 🌐 GitHub: Hifza-Khalid

About

πŸš€ PostgreSQL database schema for managing space missions, including astronaut records, spacecraft, and mission logs.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published