Research on magnesium alloys is fuelled by the need for low-density, high specific strength materials that suit aerospace and automobile industries. Consequently applications of Mg alloys are expanding to critical components where higher creep and corrosion resistance at elevated temperature (>150{493}C) are required. Hence, development of phase relations of Mg alloy systems is essential for further development. This study develops a Mg-Al-Ca ternary system from three binary systems: Mg-Ca, Al-Ca and Mg-Al. Of these three binaries, the optimized data for Al-Mg system are taken from the most recent and reliable COST 507 database. In this study, the other two systems, Mg-Ca and Al-Ca, are thermodynamically modeled and optimized with fewer model parameters by considering the experimental phase equilibria and thermodynamic data available in the literature. The calculated results from this study agree well with the experimental values. From the set of optimized model parameters of the three binary systems, a self-consistent thermodynamic database including all phases is constructed. A complete Mg-Al-Ca ternary system is constructed from this database. The isothermal sections, liquidus projections, phase assemblage diagrams, vertical sections for specific compositions and all possible invariant points are calculated for this ternary system. This database offers a useful tool for the development of new alloys and better understanding of their behavior.