Updated SQL

created foreign keys and still making more tables to join on