Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

12 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flight Operations Data Warehouse

What it is: A classic star schema warehouse built around a central flight facts table, supporting operational reporting on delays, cancellations, and on-time performance across airlines, airports, and time periods.
Real-world use: The operational core of any airline analytics team. Every OTP report, delay attribution analysis, and schedule adherence dashboard reads from a warehouse structured exactly like this.

Schema

fact_flights
  flight_key, dep_airport_key, arr_airport_key,
  airline_key, date_key, aircraft_key,
  scheduled_duration_mins, actual_duration_mins,
  delay_mins, passengers, status,
  delay_category, responsible_party

dim_airports
  airport_key, iata_code, airport_name,
  city, country, continent, timezone,
  airport_type, hub_flag

dim_airlines
  airline_key, iata_code, airline_name,
  country_of_origin, alliance, airline_type

dim_date
  date_key, full_date, year, quarter,
  month, month_name, week, day_of_week,
  day_name, is_weekend, is_public_holiday,
  season, iata_season

dim_aircraft
  aircraft_key, aircraft_type, manufacturer,
  family, range_km, typical_seats,
  engine_count, engine_type, generation

Key reports supported

  • Monthly OTP by airline and alliance
  • Delay minutes by responsible party and category
  • Busiest routes by passenger volume
  • Airport hub performance scorecard
  • Year-over-year flight volume trends

ER DIAGRAMS

1. Traditional ER Diagram (Crow's Foot Notation)

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                           FLIGHT OPERATIONS STAR SCHEMA                              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

                                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                    β”‚    dim_date      β”‚
                                    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
                                    β”‚ date_key (PK)    β”‚
                                    β”‚ full_date        β”‚
                                    β”‚ year             β”‚
                                    β”‚ quarter          β”‚
                                    β”‚ month            β”‚
                                    β”‚ month_name       β”‚
                                    β”‚ week             β”‚
                                    β”‚ day_of_week      β”‚
                                    β”‚ day_name         β”‚
                                    β”‚ is_weekend       β”‚
                                    β”‚ is_public_holidayβ”‚
                                    β”‚ season           β”‚
                                    β”‚ iata_season      β”‚
                                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                             β”‚
                                             β”‚ 1 : M
                                             β”‚
                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚                        β”‚                        β”‚
                    β–Ό                        β–Ό                        β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚   dim_airports (Dep) β”‚   β”‚      fact_flights        β”‚   β”‚   dim_airports (Arr) β”‚
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€   β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€   β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚ airport_key (PK)     β”‚   β”‚ flight_key (PK)          β”‚   β”‚ airport_key (PK)     β”‚
    β”‚ iata_code            β”‚   β”‚ dep_airport_key (FK)β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”Όβ”€β”˜                     β”‚
    β”‚ airport_name         β”‚   β”‚ arr_airport_key (FK)─────┼───┼─┐                     β”‚
    β”‚ city                 β”‚   β”‚ airline_key (FK)         β”‚   β”‚ iata_code            β”‚
    β”‚ country              β”‚   β”‚ date_key (FK)            β”‚   β”‚ airport_name         β”‚
    β”‚ continent            β”‚   β”‚ aircraft_key (FK)        β”‚   β”‚ city                 β”‚
    β”‚ timezone             β”‚   β”‚ scheduled_duration_mins  β”‚   β”‚ country              β”‚
    β”‚ airport_type         β”‚   β”‚ actual_duration_mins     β”‚   β”‚ continent            β”‚
    β”‚ hub_flag             β”‚   β”‚ delay_mins               β”‚   β”‚ timezone             β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚ passengers               β”‚   β”‚ airport_type         β”‚
               β”‚               β”‚ status                   β”‚   β”‚ hub_flag             β”‚
               β”‚               β”‚ delay_category           β”‚   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚               β”‚ responsible_party        β”‚
               β”‚               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
               β”‚                          β”‚
               β”‚ 1 : M                    β”‚ 1 : M
               β”‚                          β”‚
               β–Ό                          β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚    dim_airlines      β”‚   β”‚    dim_aircraft      β”‚
    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€   β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
    β”‚ airline_key (PK)     β”‚   β”‚ aircraft_key (PK)    β”‚
    β”‚ iata_code            β”‚   β”‚ aircraft_type        β”‚
    β”‚ airline_name         β”‚   β”‚ manufacturer         β”‚
    β”‚ country_of_origin    β”‚   β”‚ family               β”‚
    β”‚ alliance             β”‚   β”‚ range_km             β”‚
    β”‚ airline_type         β”‚   β”‚ typical_seats        β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β”‚ engine_count         β”‚
                               β”‚ engine_type          β”‚
                               β”‚ generation           β”‚
                               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Legend:
    (PK) = Primary Key
    (FK) = Foreign Key
    1 : M = One-to-Many Relationship

2. Flowchart-Style Relationship Map

                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                    β”‚              FACT FLIGHTS TABLE                  β”‚
                    β”‚                 (Central Hub)                    β”‚
                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                          β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
            β”‚                 β”‚           β”‚           β”‚                 β”‚
            β–Ό                 β–Ό           β–Ό           β–Ό                 β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚  Airlines   β”‚   β”‚   Origin    β”‚ β”‚  Date   β”‚ β”‚Aircraftβ”‚   β”‚Destination  β”‚
    β”‚   Dim       β”‚   β”‚  Airport    β”‚ β”‚  Dim    β”‚ β”‚  Dim   β”‚   β”‚  Airport    β”‚
    β”‚             β”‚   β”‚    Dim      β”‚ β”‚         β”‚ β”‚        β”‚   β”‚    Dim      β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚                   β”‚              β”‚          β”‚               β”‚
         β”‚                   β”‚              β”‚          β”‚               β”‚
         β–Ό                   β–Ό              β–Ό          β–Ό               β–Ό
    [1:M]                [1:M]           [1:M]      [1:M]           [1:M]
    Each airline        Each origin      Each date  Each aircraft   Each dest
    has many flights    airport has      has many   has many        airport has
                        many flights     flights    flights         many flights

3. Detailed Relationship Matrix

-- Relationship Summary Table
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Parent Table   β”‚  Foreign Key in   β”‚  Relationship   β”‚     Business Rule        β”‚
β”‚                 β”‚   fact_flights    β”‚    Type         β”‚                          β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  dim_airlines   β”‚  airline_key      β”‚  One-to-Many    β”‚ One airline can operate  β”‚
β”‚                 β”‚                   β”‚                 β”‚ multiple flights         β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  dim_airports   β”‚  dep_airport_key  β”‚  One-to-Many    β”‚ One airport can be the   β”‚
β”‚  (as origin)    β”‚                   β”‚                 β”‚ origin for many flights  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  dim_airports   β”‚  arr_airport_key  β”‚  One-to-Many    β”‚ One airport can be the   β”‚
β”‚  (as dest)      β”‚                   β”‚                 β”‚ destination for many     β”‚
β”‚                 β”‚                   β”‚                 β”‚ flights                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  dim_date       β”‚  date_key         β”‚  One-to-Many    β”‚ One date can have many   β”‚
β”‚                 β”‚                   β”‚                 β”‚ flights                  β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  dim_aircraft   β”‚  aircraft_key     β”‚  One-to-Many    β”‚ One aircraft can operate β”‚
β”‚                 β”‚                   β”‚                 β”‚ many flights over time   β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

4. Mermaid.js ER Diagram (for markdown documentation)

erDiagram
    dim_airlines {
        int airline_key PK
        varchar iata_code
        varchar airline_name
        varchar country_of_origin
        varchar alliance
        varchar airline_type
    }
    
    dim_airports {
        int airport_key PK
        varchar iata_code
        varchar airport_name
        varchar city
        varchar country
        varchar continent
        varchar timezone
        varchar airport_type
        varchar hub_flag
    }
    
    dim_date {
        int date_key PK
        date full_date
        int year
        int quarter
        int month
        varchar month_name
        int week
        int day_of_week
        varchar day_name
        boolean is_weekend
        boolean is_public_holiday
        varchar season
        varchar iata_season
    }
    
    dim_aircraft {
        int aircraft_key PK
        varchar aircraft_type
        varchar manufacturer
        varchar family
        int range_km
        int typical_seats
        int engine_count
        varchar engine_type
        varchar generation
    }
    
    fact_flights {
        bigint flight_key PK
        int dep_airport_key FK
        int arr_airport_key FK
        int airline_key FK
        int date_key FK
        int aircraft_key FK
        int scheduled_duration_mins
        int actual_duration_mins
        int delay_mins
        int passengers
        varchar status
        varchar delay_category
        varchar responsible_party
    }
    
    %% Relationships
    dim_airlines ||--o{ fact_flights : "operates"
    dim_airports ||--o{ fact_flights : "origin"
    dim_airports ||--o{ fact_flights : "destination"
    dim_date ||--o{ fact_flights : "scheduled"
    dim_aircraft ||--o{ fact_flights : "assigned"
Loading

5. ASCII Art Data Flow Diagram

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                         DATA FLOW DIAGRAM                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

    Source Systems ──────► ETL Process ──────► Data Warehouse ──────► Reports
         β”‚                      β”‚                     β”‚                    β”‚
         β”‚                      β”‚                     β”‚                    β”‚
         β–Ό                      β–Ό                     β–Ό                    β–Ό
    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”           β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
    β”‚Ops DB   β”‚           β”‚ Extract  β”‚          β”‚  Star    β”‚        β”‚ Monthly  β”‚
    β”‚Flight   │──────────►│          │─────────►│  Schema  │───────►│ OTP      β”‚
    β”‚Data     β”‚           β”‚Transform β”‚          β”‚          β”‚        β”‚ Report   β”‚
    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜           β”‚Load (ETL)β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚                    β”‚
                                                      β”‚                    β”‚
                                                      β–Ό                    β–Ό
                                                β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”        β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                                β”‚  PowerBI β”‚        β”‚ Delay    β”‚
                                                β”‚  Dashboard│───────►│ Analysis β”‚
                                                β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Let’s start what we will do:

  • First, I will do my research to understand how airline companies work and what are the main business processes we are interested in analyzing.
  • Then, I will gather some of the questions that we need our model to answer.
  • Then we will dive into the modeling process, defining the dimensions, facts, measurements, granularity, sparsity, and summarizability issues for our model.
  • Next step will be designing the schema for our model.
  • Then I will collect some data to populate into the data warehouse.
  • Next step, I will integrate the data into the database (SQL SERVER Database).
  • Before diving into the analysis, I will spend some time talking about indexes.
  • The last step is what we are doing all those steps for, which is analyzing the data warehouse and getting interesting insights to help the Management Team make data-driven decisions.

In the project files you will see some files:

  • Project Documentations.pdf: The project's documentations.
  • DWH Schema.png: The schema for our data warehouse model.
  • DWH Tables.xlsx: The dimensions / facts / indexes of the data warehouse.
  • DWH Creation.SQL: The SQL Scripts for creating the data warehouse tables.
  • Schema.pdf: The schema for our data warehouse generated from SQL SERVER.
  • Tables' Populations: The SQL Scripts to poulate the data into the tables.
  • DWHProjAirlineCom.bak: Backup of the data warehouse, you can restore it using SQL Server Management Studio.
  • Insights.SQL: The SQL Queries used to gain insights and answer questions from the data warehouse.

Useful Resources

# Save the script as init_postgresql.sql
# Then run:
psql -U postgres -f init_postgresql_database.sql

# Or with specific database user
psql -U your_username -d postgres -f init_postgresql_database.sql
psql -U postgres -d flight_ops_data_warehouse -f ddl_bronze.sql
\copy bronze.csv_fact_flights (
    dep_airport_key,
    arr_airport_key,
    airline_key,
    date_key,
    aircraft_key,
    scheduled_duration_mins,
    passengers,
    actual_duration_mins,
    delay_mins,
    status,
    delay_category,
    responsible_party
)
FROM '/home/outis/TechBoy/Flight_Operations_Data_Warehouse/datasets/facts_flights.csv'
CSV HEADER;
# Allow postgres user to traverse your directory
chmod o+x /home/outis
chmod o+x /home/outis/TechBoy
chmod o+x /home/outis/TechBoy/Flight_Operations_Data_Warehouse
chmod o+x /home/outis/TechBoy/Flight_Operations_Data_Warehouse/datasets

# Allow postgres to read the CSV files
chmod o+r /home/outis/TechBoy/Flight_Operations_Data_Warehouse/datasets/*.csv

About

A classic star schema warehouse built around a central flight facts table, supporting operational reporting on delays, cancellations, and on-time performance across airlines, airports, and time periods.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages