Achieve Mysql or Psql relational table (Foreign key constraint) feature in Apache Cassandra

RamS :

Please help. I want to know how to query like Mysql relational tables (which mapped to another table by using foreign key constraint) select query or other queries in Apache Cassandra? Is there is any way to achieve a foreign key constraint feature in Apache Cassandra?

Alex Ott :

No. There is no such thing in Cassandra. All joins & checks should be done on the application side. Usually, when people need information from multiple tables, then they are building an aggregating table so it could be queried as one object. And all data modeling in Cassandra is going from queries, not from the logical database schema.

I really recommend to take DS220: Data modeling in Cassandra course on the DataStax Academy (please take DS201 prior to it, to understand why Cassandra works this way).

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=386467&siteId=1
Recommended