ER Diagram 2. Data Extraction S ELECT * From employee em LEFT JOIN contact con ON em.emp_id = con.ref_id LEFT JOIN team _employee t e ON em.emp_id = t e emp_id LEFT JOIN team tm ON te.team_id = tm.team_id LEFT JO IN team_project tp ON t m.team_ id = tp.team_id LEFT JOIN project pj ON pj.proj _id = tp.proj _id LEFT JOIN department dp ON dp.dep_id = tm.dep_id LEFT JOIN company cp ON dp.comp _id = c p.comp_id LEFT JOIN leave lv ON em .emp_id = lv.leave_id LEFT JOIN designation dg ON dg.desig_id = em.desi g_id LEFT JOIN de signation_salary ds ON ds.desig_id = em.desig_id LEFT JOIN salary_scale sc ON sc.s c _id = ds.s c _id WHERE emp_id = 2 6 Above query will pro duce more than one row because we have joined every table connected to Employee table. F o r generating cleaner data related to an Employee we can create more than one S elect s tatements and showed the ir results in a report that has divided into several part s For General Det ails about Employee S ELECT * From employee em LEFT JOIN contact con ON em.emp_id = con.ref_id WHERE emp_i d = 01 For Emplo yee Projects S ELECT pj. name, pj.status, pj.started _date, pj. budget From employee em LEFT JOIN team _employee t e ON em.emp_id = t e emp_id LEFT JOIN team tm ON te.team_id = tm.team_id LEFT JO IN team_project tp ON t m.team_ id = tp.team_id LEFT JOIN project pj ON pj.proj _id = tp.proj _id WHERE emp_i d = 01 For Employee Leaves S ELECT l t Name , COUNT( * ) as c ount FROM employee em LEFT JOIN leave lv ON em .emp_id = lv.leave_id LEFT JOIN leave_type lt ON lt.lt_id = lv.lt_id WHERE emp_id = 2 6 GROUP BY lv .lt_id S o on for other Entities. 3. Employee Report { "Employees": [ { "emp_id": "01", "first_name": "Prabhath", "middle_name": "Madhawa", "last_name": "Weersinghe", "contact": { "address_line1": "187/105 A", "address_line2": "Kiralawelkatuwa road", "address_line3": "Embilipitiya", "country": "Sri Lanka", "telephone_number": "+94713552204", "email": "madhawazu@gmail.co m" }, "emergency_contact": { "address_line1": "187/105 A", "address_line2": "Kiralawelkatuwa road", "address_line3": "Embilipitiya", "country": "Sri Lanka", "telephone_number": "+94777178764", "em ail": "dilini@gmail.com" }, "hobbies": [ "Reading", "Writing", "Facebook", "Movies", "Trading" ], "joined_date": "01 - 08 - 2022", "resigned_date": "", "active": "true", "team": { "team_id": "01", "name": "Solution Team 01", "stack": [ "Angular", "Java", "Mongodb", "Spring boot" ], "project": [ { "project_id": "01", "name": "Project 01", "status": "ongoing" }, { "project_id": "02", "name": "Project 02", "status": "initiated" } ] } } ] } Json will look like this; I haven’t added all the tables because it will follow the same pattern. But above Select query cannot directly produce this format data , some serv ice in between database and Report need to p rocess data to this format.