Skip to content

About

High school database project in Informatik C, grade 12. Danish Superliga data in 9 tables with an ER diagram, normalised to 3NF, and SQL queries.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Superliga SQL Database Project

This project was created as part of my Informatik C course at Københavns Åbne Gymnasium. The purpose of the project was to build a relational database based on Danish Superliga data and use SQL to structure, store and query football-related information.

Project overview

The database contains information about Superliga clubs, football players, coaches, presidents, nationalities, ages, agents and player positions. The project focuses on basic database design, relational tables and SQL queries that can be used to organize and retrieve football data.

What the project includes

  • SQL script with table creation and data insertion
  • A database file with Superliga-related data
  • Tables for clubs, players, coaches, agents, nationalities, ages and positions
  • Relations between players, clubs, agents and positions
  • Example SQL queries using joins, grouping, filtering and aggregation

Database diagram

The 9 tables and how they are connected, drawn from the CREATE TABLE statements in the SQL script. Table and column names are in Danish, as in the database.

erDiagram
    Praesident ||--o{ Klub : "leads"
    Klub ||--o{ Traener : "employs"
    Nationalitet ||--o{ Traener : "nationality of"
    Klub ||--o{ Fodboldspiller : "has"
    Agent ||--o{ Fodboldspiller : "represents"
    Alder ||--o{ Fodboldspiller : "age of"
    Nationalitet ||--o{ Fodboldspiller : "nationality of"
    Fodboldspiller ||--o{ SpillerSom : "plays as"
    Position ||--o{ SpillerSom : "position in"

    Praesident {
        int pId PK
        varchar pNavn
    }
    Klub {
        int kId PK
        varchar kNavn
        int pId FK
    }
    Traener {
        int tId PK
        varchar tNavn
        int KlubId FK
        int NationalitetId FK
    }
    Fodboldspiller {
        int fId PK
        varchar fNavn
        int alId FK
        int aId FK
        int kId FK
        int nId FK
    }
    SpillerSom {
        int fId PK, FK
        int poId PK, FK
    }
    Agent {
        int aId PK
        varchar aNavn
    }
    Alder {
        int alId PK
        varchar alNavn
    }
    Nationalitet {
        int nId PK
        varchar nNavn
    }
    Position {
        int poId PK
        varchar poNavn
    }
Loading

SpillerSom links players and positions, so one player can have several positions.

Example use cases

The database can be used to answer questions such as:

  • Which young Danish players are 21 years old or younger?
  • How many players does each club have?
  • What is the average age of players in each club?
  • Which agents represent which players?
  • Which positions can different players play?

Technologies used

  • SQL
  • Relational database design
  • Database tables and relationships
  • Joins, filtering, grouping and aggregation

What I learned

Through this project, I gained basic experience with SQL, database structure and working with sports-related data. I learned how to create relational tables, connect data through IDs and write queries that transform raw football data into more useful information.

The project also strengthened my interest in working with data, systems and analysis in a sports-related context.

Note

This was a school project and is not a production system. The data was used for learning purposes and may not be fully up to date.

About

High school database project in Informatik C, grade 12. Danish Superliga data in 9 tables with an ER diagram, normalised to 3NF, and SQL queries.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors