Updated SQL database structure