Atomic Scale Understanding Of Ferroelectricity And Superconductivity In Srtio3