Created models & updated the SQL script