What would be the main advantages of a (purely?) functional database?
-
This question is related to a) the concept of functional data structures, as well as other such data structures that can be used to store data; and b) a database implemented in a functional language such as Lisp (bytecode) or Clojure (on the JVM). Assuming performance was an issue that could be solved, what would be the inherent benefits of having a relational database written in a functional language using functional data structures? I imagine one of the problems that RethinkDB is trying to solve is hot backups, and such a system would address that. But what else? Apart from AllegroDB, which is a large scale lisp based Graph database, I haven't come across a system that follows the two concepts mentioned above.
-
Answer:
Concurrency. A functional database, like most currently popular functional languages, would be highly concurrent. The elimination of shared state means you can get rid of locks and (probably) have composable transactions that would make writing concurrent applications that access the database a lot easier to write, a lot easier to prove correct, and a lot faster. Replication/backup. If a database can be represented as a persistent functional object (and is immutable), all you need to do is copy it somewhere and you've backed it up. There's no chance you'll have corrupted data, apart from possibly some data that hasn't been completely written, but you can of course just ignore this data in the copied file and have no problems. This means backup is literally one rsync command. Sharding. This is a little more complicated, but in a well-designed data structure, having it be immutable and have no shared state goes a long way towards the sharding goal. Of course, a lot of this task falls under the domains of concurrency and replication, so there you go.
Leif Walsh at Quora Visit the source
Related Q & A:
- What is the best practice for free space for a SQL server database drive?Best solution by Database Administrators
- What are the main features of a community web site?Best solution by cardinalgroup.ca
- What are the main differences between a Mobile and a PDA?Best solution by Yahoo! Answers
- What are practical and theoretical advantages in sociology?Best solution by Yahoo! Answers
- What are the main features of a Chinese wedding?Best solution by en.wikipedia.org
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.