CouchDB Interview Questions
1. What is CouchDB?
CouchDB is documented database server accessible through a RESTful JSON API. It is distributed, robust, incremental replication with bi-direction. It is schema-free with flat address space.
CouchDB is an open source NoSQL database which focuses on ease of use. It was developed by Apache. It is fully compatible with the web. CouchDB uses JSON to store data, JavaScript as its query language to transform the documents, using MapReduce, and HTTP for an API.
CouchDB features are as follows:
CouchDB can be replicated across multiple server instances.
CouchDB has various libraries for the language of your choice.
It has fast indexing and retrieval
It has a REST-like interface for document insertion, updates, recovery, and deletion.
CouchDB supports JSON-based document format, i.e., easily translatable across different languages.
2. In which language CouchDB is written?
CouchDB is written in Erlang. It is a concurrent, functional programming language mainly focuses on fault tolerance (Erlang programming language also used for build massively scalable soft real-time system with requirements on high availability).
Some of its parts are written in C language too. As we know that CouchDB supports view server and the views (form map or reduce) are written in JavaScript per default (but can also be written in Erlang). Therefore CouchDB requires the JavaScript engine SpiderMonkey (which is written in C language).
3. In which language CouchDB's early work was started?
CouchDB early work was started in C++. But later, it was replaced by the Erlang OTP platform.
Erlang has proven as an excellent match for this project.
4. Is CouchDB used in the Software industry?
CouchDB is very popular now a day, and many companies are using CouchDB.
These are the essential features of CouchDB:
CouchDB can be replicated across multiple server instances.
CouchDB has various libraries for the language of your choice.
It has fast indexing and retrieval
It has a REST-like interface for document insertion, updates, recovery, and deletion.
CouchDB supports JSON-based document format, i.e., easily translatable across different languages.
That's why the software companies use CouchDB.
5. Why Does CouchDB Not Use Mnesia?
The first is a storage limitation of 2 gig per file.
The second is that it requires validation and fixup cycle after a crash or power failure, so even if the size limitation is lifted, the fixup time on large files is prohibitive.
Mnesia replication is suitable for clustering, but not disconnected, distributed edits. Most of the “cool” features of Mnesia aren’t really useful for CouchDB.
Also Mnesia isn’t really a general-purpose, large-scale database. It works best as a configuration type database, the type where the data isn’t central to the function of the application but is necessary for the normal operation of it. Think things like network routers, HTTP proxies and LDAP directories, things that need to be updated, configured and reconfigured often, but that configuration data is rarely very large.
6.How do you compare MongoDB, CouchDB, and CouchBase?
MongoDB and CouchDB are document-oriented database. MongoDB and CouchDB are the most typical representative of the open-source NoSQL database. They have nothing in common other than are stored in the document outside. MongoDB and CouchDB, the data model interface, object storage and replication methods have many different.
7. How is PouchDB different from CouchDB?
PouchDB is also a CouchDB client, and you should be able to switch between a local database or an online CouchDB instance without changing any of your application’s code.
However, there are some minor differences to note:
View Collation – CouchDB uses ICU to order keys in a view query; in PouchDB they are ASCII ordered.
View Offset – CouchDB returns an offset property in the view results. In PouchDB, offset just mirrors the skip parameter rather than returning a true offset.
8. So is CouchDB now going to write in Java?
Erlang is a great fit for CouchDB and I have absolutely no plans to move the project off its Erlang base. IBM/Apache’s only concerns are we remove license incompatible 3rd party source code bundled with the project, a fundamental requirement for any Apache project. So some things may have to replaced in the source code (possibly Mozilla Spidermonkey), but the core Erlang code stays.
An important goal is to keep interfaces in CouchDB simple enough that creating compatible implementations on other platforms is feasible. CouchDB has already inspired the database projects RDDB and Basura. Like SQL databases, I think CouchDB needs competition and a ecosystem to be viable long term. So Java or C++ versions might be created and I would be delighted to see them, but it likely won’t be me who does it.
9. What does IBM’s involvement mean for CouchDB and the community?
The main consequences of IBM’s involvement are:
– The code is now being apache licensed, instead of GPL.
– Damien is going to be contributing much more time!
10. Mention the main features of CouchDB?
JSON Documents – Everything stored in CouchDB boils down to a JSON document.
RESTful Interface – From creation to replication to data insertion, every management and data task in CouchDB can be done via HTTP.
N-Master Replication – You can make use of an unlimited amount of ‘masters’, making for some very interesting replication topologies.
Built for Offline – CouchDB can replicate to devices (like Android phones) that can go offline and handle data sync for you when the device is back online.
Replication Filters – You can filter precisely the data you wish to replicate to different nodes.
11. What is the use of CouchDB?
CouchDB allows you to write a client-side application that talks directly to the Couch without the need for a server-side middle layer, significantly reducing development time. With CouchDB, you can easily handle demand by adding more replication nodes with ease. CouchDB allows you to replicate the database to your client and with filters you could even replicate that specific user’s data.
Having the database stored locally means your client-side application can run with almost no latency. CouchDB will handle the replication to the cloud for you. Your users could access their invoices on their mobile phone and make changes with no noticeable latency, all whilst being offline. When a connection is present and usable, CouchDB will automatically replicate those changes to your cloud CouchDB.
CouchDB is a database designed to run on the internet of today for today’s desktop-like applications and the connected devices through which we access the internet.
12. What is CouchdbKit?
Couchdbkit’s goal is to provide a framework for your Python application to access and manage Couchdb. It provides you a full-featured and easy client to access and manage CouchDB. It allows you to manage a CouchDB server, databases, doc managements and view access. All objects mostly reflect python objects for convenience. Server and Databases objects could be used for example as easy as using a dict.
No comments:
Post a Comment