create view MechanicDetails (MechanicId, Name, Surname, DateOfBirth, HangarNumber, MaintenanceId,
    Date, AirplaneId, AirplaneModel, Manufacturer) as
    select mechanic.employeeid, employee.name, employee.surname, employee.dateofbirth,
           mechanic.hangarnumber, maintenance.id, maintenance.date,
           maintenance.airplaneid, airplanemodel.model, airplanemodel.manufacturer
    from mechanic
    join employee on mechanic.employeeid = employee.id
    join worksonmaintenance on mechanic.employeeid = worksonmaintenance.mechanicemployeeid
    join maintenance on worksonmaintenance.maintenanceid = maintenance.id
    join airplane on maintenance.airplaneid = airplane.id
    join airplanemodel on airplane.modelid = airplanemodel.id;

