hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mich Talebzadeh" <>
Subject RE: foreign keys in Hive
Date Sun, 10 Jan 2016 19:09:46 GMT


Primary key and foreign key constraints are really more applicable to transactional databases
where the transaction logic needs to be enforced. That is once a unit of work is completed
it is either committed or rolled back.


It does not really make sense to enforce the same logic in Hive which is built on schema on
read. Once you start adding foreign keys constraints to Hive, you are actually making it “schema
on read”. Case in point if you want to add data to multiple tables in Hive, then you have
to know the schema in advance as your data may be rejected (say you are inserting into child
table without the corresponding record in parent table). This is not what Hive is designed
for in my opinion.






Dr Mich Talebzadeh


LinkedIn   <>


Sybase ASE 15 Gold Medal Award 2008

A Winning Strategy: Running the most Critical Financial Data on ASE 15


Author of the books "A Practitioner’s Guide to Upgrading to Sybase ASE 15", ISBN 978-0-9563693-0-7.

co-author "Sybase Transact SQL Guidelines Best Practices", ISBN 978-0-9759693-0-4

Publications due shortly:

Complex Event Processing in Heterogeneous Environments, ISBN: 978-0-9563693-3-8

Oracle and Sybase, Concepts and Contrasts, ISBN: 978-0-9563693-1-4, volume one out shortly




NOTE: The information in this email is proprietary and confidential. This message is for the
designated recipient only, if you are not the intended recipient, you should destroy it immediately.
Any information in this message shall not be understood as given or endorsed by Peridale Technology
Ltd, its subsidiaries or their employees, unless expressly so stated. It is the responsibility
of the recipient to ensure that this email is virus free, therefore neither Peridale Ltd,
its subsidiaries nor their employees accept any responsibility.


From: Ashok Kumar [] 
Sent: 10 January 2016 14:45
To: User <>
Subject: foreign keys in Hive




what is the equivalent to foreign keys in Hive?




View raw message