Why is the formula for sodium nitrate NaNO3?

Na is +1, nitrate is -1.