anon
anon

Reputation: 349

Does BigQuery support inheritance in their tables?

I was curious if BigQuery tables allow you to use inheritance in their tables. I know they allow for optional primary and foreign keys but not too sure if you can combine inheritance with those or if you have to do it separately. I saw another stackoverflow post that said in Postgresql they do not allow the combination of foreign keys and inheritance so I'm not sure if that's also the case with BigQuery. Would be great to see some examples or an explanation if the combination is possible.

Thank you!

Upvotes: 0

Views: 265

Answers (1)

Elliott Brossard
Elliott Brossard

Reputation: 33745

BigQuery does not have primary or foreign keys. It's up to you to impose whatever semantics are appropriate on the tables that you store. For example, you could have two tables that are related by a customer_id column, and you can join the tables using this column despite not needing to declare that it is a primary key in one or a foreign key in the other.

Upvotes: 3

Related Questions