Added SQL statements with foreign keys