SQL structure updated