Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there any concept of stored procedures in Cassandra?

For database management, my team right now is using a RDBMS based solution (MSSQL to be exact), but we expect to move to Cassandra soon as we're expecting a huge bump in traffic.

The application logic right now is decoupled from insertion logic, as the application only calls the specific procedures in SQL which calls some data validations and makes corresponding insertions.

I want to do something similar in Cassandra. However, I am unable to find anything that could aid me in doing so. UDFs are not useful as they are mostly used in SELECT query. I'd appreciate the community's help/advice on this, thanks!

like image 416
Tarun Verma Avatar asked Oct 10 '16 16:10

Tarun Verma


1 Answers

The closest feature to a stored procedure will be a batch as it will allow you to "bundle" different DML statements associated to an insert, update or delete.

If you are moving from RDBMS to Cassandra, one of the biggest challenges is to adjust to the data modeling required, and more specific, to denormalization of data. The data model is the key factor of success (and failure) of any Cassandra implementation, and because of that, you may find several resources in the web (to mention the basics eBay blog, Datastax academy's Data model course)

Good luck with your implementation!

like image 99
Carlos Monroy Nieblas Avatar answered Nov 04 '22 03:11

Carlos Monroy Nieblas