Superhero Schema
Why not implement somthing that could potentially save the world?

For my assignment for Introduction to Databases, I chose to design a schema that would help organizations affiliated with the government and police force to seek out the assistance of a superhero if human power itself could not solve a crime or catch the culprit.

"Help Wanted" contains information about all humans that exist on our planet, specifying which ones are heroes and which ones are villians. Relationships among them are also extensively documented via 11 relations.

Each table contains a primary key, which is often the assigned ID of the noun the table refers to. For instance, the crime table has attributes such as the crime ID, location of the crime, the date and time of the crime, and a description of the time. Since the crime ID is unique to every instance, it would be the primary key for the crime table.

Linking tables were also created to form relationships between two separate table. For example, the SuperSave table was created to inform the database of which superhero resolved which crime. The crime ID and superhero ID acted as foreign keys to their home tables, Crime and Superhero.

I used SQL Workbench to construct the entire database from scratch, specifying relations and keys for each one. You can check out the entity-relational model below for specifics.

In order to access the database (as well make insertions and deletions), I wrote a script of over 1000 lines in Python. I have also maintained an SQL script if you would like to construct the database for yourself in Workbench.

Check it out!

Take me Home!