updated SQL Structure