Updated ERD and sql queries