Closed gvoysey closed 6 years ago
Don't really have a good answer for you here. dataset
is meant to make SQL databases pretend like they're some NoSQL thing, and foreign key is exactly where that stops. In the original use case (scrapers), we'd often use a natural key like a source URL as a pseudo foreign ID.
If your use case requires proper foreign IDs, I would see it as a signal that you should consider upgrading to a proper ORM like SQLAlchemy.
this is less of a bug report and more of an open question not addressed in the docs. What are the semantics of foreign key relationships, one-to-many relationships between tables, etc.?
Say i have two tables:
it's not clear to me how i add a FK (to
bar
? ), or query for "bob and all his clothes".