This was a final project for Marist University's Database Management class (Fall 2024), where we had to create a SQL database, from creating the ERD, to creating and populating tables, to making complex SQL queries for it.
My database centered around information related to the presidents of the United States, with information up until Joe Biden (pre-2024-election). It was a lot of planning, headaches, and work, but I'm glad with not only the concept, but also the execution, which is why I've moved it into it's own Github repository a year later.
This description was taken from the PDF file.
The Presidents database holds historical and current data in relation to the presidents of the United States of America. This also includes data about people and events in relation to any president, such as first ladies, vice presidents, and candidates who ran against presidents.
This database can be used by institutions that need historical and present data about presidents, as well as how each president of person close to a president is connected to another person or event. The database is designed with these requirements:
-
A politician, which is identified by a unique politician number, has a first name, last name, birth date, and date of death. A single politician can be a single president, vice president, or a first lady. A politician can also be the runner up candidate in many elections.
-
The president, which is identified by a unique president number, is a politician. The president has also ran in one or many elections. They also have had one or many first lady’s during their administration. A single president may have worked with one or many vice presidents in the executive office. A president has also started and ended their term on a specific date. A politician who was president for two or more non-consecutive terms (I’m looking at you Grover Cleaveland), is considered a different unique president. A president also may or may not have been impeached during their administration.
-
The vice president, which is identified by a unique vice president number, is a politician. A single vice president may have worked with one or many presidents in the executive office. A vice president has also started and ended their term on a specific date. Vice presidents also serve as presidents of the Senate, who can be another voter for their party in the Senate if it is split 50/50, thus the majority ruling party of the Senate must be taken into consideration.
-
A political party is uniquely identified by the party’s name, and each party has a color, a description of their past views, and a description of their current views.
-
Presidents and vice presidents working together are working under one political party.
-
An event is uniquely identified by its name, and it has a start and end date. An event can happen under many presidents, and many events can happen under one president.
-
First ladies, uniquely identified by a first lady number, are politicians that are first ladies to one president. They have dates for when they started and stopped being first lady, as well as the type of relationship they had with the president (Such as Martha Jefferson being first lady and daughter of Thomas Jefferson).
-
Elections are uniquely identified by the year they took place in. Each election has a total number of electoral college votes, as well as the percentage of the population that voted at the time.
-
Two politicians are associated with an election, those two being the winner and the 2nd-in-place loser, with the winner becoming a president. Multiple politicians can run in several elections.