© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•4y ago•
2 replies
felixthehat

Noob foreign keys q – table of venues and table of reviews, how best to link?

Hi, I have a table of
restaurants
restaurants
with metadata (name, address etc) and a table called
reviews
reviews
– I'd like when I query the
restaurants
restaurants
table to pull in relevant
reviews
reviews
. In which table should I add a foreign key column? Both? Should the
reviews
reviews
table have a foreign key column with the restaurant ID in it? Bit confused on the best approach, thanks! Note – I only plan one review/row per restaurant if that helps
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

array of foreign keys
SupabaseSSupabase / help-and-questions
4y ago
multiple foreign keys in one table
SupabaseSSupabase / help-and-questions
4y ago
how to have an array of foreign keys (one to many relationship)?
SupabaseSSupabase / help-and-questions
4y ago
How to count a joined foreign table?
SupabaseSSupabase / help-and-questions
4y ago