I am looking at the restaurants database. It contains tables Restaurants and Location. As far as I can understand from eyeballing the db content, Location.restaurant_id is referring to Restaurants.id, i.e. table Location contains addresses of the restaurants in table Restaurants. But in the database creation code Location.restaurant_id is made a primary key, not a foreign key:
You're right - that's an error, I'll update that code (note that this is not actually code we used in our experiments, it was contributed to the repository later).
I am looking at the restaurants database. It contains tables
Restaurants
andLocation
. As far as I can understand from eyeballing the db content,Location.restaurant_id
is referring toRestaurants.id
, i.e. tableLocation
contains addresses of the restaurants in tableRestaurants
. But in the database creation codeLocation.restaurant_id
is made a primary key, not a foreign key:https://github.com/jkkummerfeld/text2sql-data/blob/master/tools/create_restaurant_database.py#L32
What would be the right thing to do here?