Class 12 Python + SQL Project
Game Release Database (2010 - Present)
Project Description:
This project combines Python and SQL to create a game release database system.
Students can add, view, search, and sort games released from the year 2010 onwards.
The program uses SQLite as the backend database and Python for the user interface.
Features:
- Create and connect to SQLite database
- Create a table for storing games
- Add a new game to the database
- Display all games
- Search games by release year
- Sort games alphabetically or by year
- Use SQL queries for data handling
Python + SQL Code:
def game_details_by_year(year):
"""
Retrieves details about video games released in a given year.
Args:
year (int): The year for which to retrieve game information.
Returns:
list: A list of dictionaries with details about games released that year.
Returns an empty list if no games are found.
"""
game_data = {
"2010": [
{"title": "Mass Effect 2", "developer": "BioWare", "genre": "Action RPG"},
{"title": "StarCraft II: Wings of Liberty", "developer": "Blizzard Entertainment", "genre":
"Real-time strategy"},
{"title": "Fallout: New Vegas", "developer": "Obsidian Entertainment", "genre": "Action
RPG"},
],
"2011": [
{"title": "Portal 2", "developer": "Valve", "genre": "Puzzle-platformer"},
{"title": "The Elder Scrolls V: Skyrim", "developer": "Bethesda Game Studios", "genre":
"Open-world RPG"},
{"title": "Batman: Arkham City", "developer": "Rocksteady Studios", "genre": "Action-
adventure"},
],
"2012": [
{"title": "Dishonored", "developer": "Arkane Studios", "genre": "Action-stealth"},
{"title": "Mark of the Ninja", "developer": "Klei Entertainment", "genre": "Stealth-
platformer"},
{"title": "Borderlands 2", "developer": "Gearbox Software", "genre": "Action RPG, looter-
shooter"},
],
"2013": [
{"title": "Spelunky", "developer": "Mossmouth", "genre": "Roguelike platformer"},
{"title": "BioShock Infinite", "developer": "Irrational Games", "genre": "First-person
shooter"},
{"title": "Tomb Raider", "developer": "Crystal Dynamics", "genre": "Action-adventure"},
],
"2014": [
{"title": "Alien: Isolation", "developer": "Creative Assembly", "genre": "Survival horror"},
{"title": "Divinity: Original Sin", "developer": "Larian Studios", "genre": "CRPG"},
{"title": "Dragon Age: Inquisition", "developer": "BioWare", "genre": "Action RPG"},
],
"2015": [
{"title": "Metal Gear Solid V: The Phantom Pain", "developer": "Kojima Productions",
"genre": "Action-adventure"},
{"title": "The Witcher 3: Wild Hunt", "developer": "CD Projekt Red", "genre": "Open-
world RPG"},
{"title": "Bloodborne (PC via emulator)", "developer": "FromSoftware", "genre": "Action
RPG"},
],
"2016": [
{"title": "Dishonored 2", "developer": "Arkane Studios", "genre": "Action-stealth"},
{"title": "Civilization VI", "developer": "Firaxis Games", "genre": "Turn-based strategy"},
{"title": "Dark Souls III", "developer": "FromSoftware", "genre": "Action RPG"},
],
"2017": [
{"title": "Divinity: Original Sin II", "developer": "Larian Studios", "genre": "CRPG"},
{"title": "PlayerUnknown’s Battlegrounds", "developer": "PUBG Corporation", "genre":
"Battle royale"},
{"title": "Horizon Zero Dawn (PC port)", "developer": "Guerrilla Games", "genre": "Action
RPG"},
],
"2018": [
{"title": "Into the Breach", "developer": "Subset Games", "genre": "Turn-based tactics"},
{"title": "Red Dead Redemption 2 (PC)", "developer": "Rockstar Games", "genre": "Action-
adventure"},
{"title": "Celeste", "developer": "Matt Makes Games", "genre": "Platformer"},
],
"2019": [
{"title": "Disco Elysium", "developer": "ZA/UM", "genre": "Narrative RPG"},
{"title": "Control", "developer": "Remedy Entertainment", "genre": "Action-adventure"},
{"title": "Sekiro: Shadows Die Twice", "developer": "FromSoftware", "genre": "Action-
adventure"},
],
"2020": [
{"title": "Death Stranding", "developer": "Kojima Productions", "genre": "Action"},
{"title": "Hades", "developer": "Supergiant Games", "genre": "Roguelike action"},
{"title": "Microsoft Flight Simulator", "developer": "Asobo Studio", "genre":
"Simulation"},
],
"2021": [
{"title": "Valheim", "developer": "Iron Gate Studio", "genre": "Survival sandbox"},
{"title": "Resident Evil Village", "developer": "Capcom", "genre": "Action horror"},
{"title": "Forza Horizon 5", "developer": "Playground Games", "genre": "Racing"},
],
"2022": [
{"title": "Elden Ring", "developer": "FromSoftware", "genre": "Action RPG"},
{"title": "God of War Ragnarök", "developer": "Santa Monica Studio", "genre": "Action-
adventure"},
{"title": "Strange Horticulture", "developer": "Bad Viking", "genre": "Puzzle adventure"},
],
"2023": [
{"title": "Baldur's Gate 3", "developer": "Larian Studios", "genre": "CRPG"},
{"title": "Starfield", "developer": "Bethesda Game Studios", "genre": "Action RPG"},
{"title": "Dead Space (remake)", "developer": "Motive Studio", "genre": "Survival
horror"},
],
"2024": [
{"title": "Elden Ring: Shadow of the Erdtree", "developer": "FromSoftware", "genre":
"Action RPG"},
{"title": "Balatro", "developer": "LocalThunk", "genre": "Roguelike deck-builder"},
{"title": "Metaphor: ReFantazio", "developer": "Fantastico Studio", "genre": "JRPG"},
],
"2025": [
{"title": "Monster Hunter Wilds", "developer": "Capcom", "genre": "Action RPG"},
{"title": "Doom: The Dark Ages", "developer": "id Software", "genre": "FPS"},
{"title": "Assassin's Creed Shadows", "developer": "Ubisoft", "genre": "Action-
adventure"},
],
# Lookup using string key to match dictionary
return game_data.get(str(year), [])
if __name__ == "__main__":
user_year = int(input("Enter the year to get game information: "))
games = game_details_by_year(user_year)
if games:
print(f"Games released in {user_year}:")
for g in games:
print(f" - Title: {g['title']}\n Developer: {g['developer']}\n Genre: {g['genre']}")
else:
print(f"No game information found for the year {user_year}.")wq