NoSQL interview questions

NoSQL interview questions | Freshers & Experienced

  • Toby Rogers
  • 12th Apr, 2021

Key Features of Nosql

Below are few major features of Nosql

Dynamic schemas


Integrated Caching

High scalability

Fast performance

Non Relational

Easy storage and retrieval

Can used with OOPS

Easy Data modeling

Q1. What is NoSQL?

NoSQL aka "not only SQL" is a non-relational Database Management system that is used for distributed data stores. It is easy to scale as it doesn't require a fixed schema. In other words, NoSQL is access to database design that provides a variety of data models that includes key-value, column, document and graph formats. The big data and real-time applications use a NoSQL database to store their data.

Q2. Why is NoSQL document-oriented data model an attractive choice?

As data-sensitive organizations have faced many data-related problems, so a new solution has been introduced and the answer is NoSQL Document Databases. It is attractive to the users because it keeps data in documents rather than rows and columns. Some minimum standard format rules must be followed by these documents. The format choices could be JSOS, XML, YAML, etc. The priority is always JSON for NoSQL databases due to its better compatibility and readability.

Q3. Explain BASE properties, as seen in NoSQL

The BASE acronym is used to explain the properties of the NoSQL database. The BASE tells about the properties of databases, usually NoSQL databases. The full form of BASE is Basically Available, Soft state, Eventual consistency.

Q4. Why to use NoSQL?

Reasons to use NoSQL:

  • NoSQL is widely used to store large volumes of data that might have no structure.
  • It does not limit the type of data that you can store. As your needs change, you can add new data types.
  • NoSQL is used to make the most of cloud computing and storage.
  • The data is easy to share across different servers to make the cloud solution to be scalable. To develop speed.
  • As NoSQL data doesn't need to be ready ahead of time, therefore the user can make frequent updates to the data structure with minimal downtime.
  • To speed up horizontal scalability.

Q5. What are the advantages and disadvantages of NoSQL?

Advantages of NoSQL:

  • Elastic scalability: With the advantage of new nodes, NoSQL databases are made for transparent expansion. These databases are meant for use with low-cost commodity hardware. NoSQL databases are a better fit in today's world where upward scalability is being replaced by outward scalability.
  • Storage: Transaction rates are growing from recognition, which demands a lot of space to store this large amount of data. NoSQL handles this easily.
  • Database administration: NoSQL demands very less work on management, auto repair capabilities with data distribution and simplified data models and administration requirements fewer tuning.
  • Economy: NoSQL databases can be simply placed in cheap commodity hardware clusters as transaction and data volumes increase which means that the user can process and store more data at very less cost.

Disadvantages of NoSQL

  • The CAP (consistency, availability, and partition tolerance) theorem states that only two of the three CAP properties can be used at the same time in any distributed system. By adjusting these properties in support of strong partition tolerance enables NoSQL users to speed up horizontal scalability.
  • Immature: The main disadvantage of the NoSQL is that it is very immature. It hardly made it out of the pre-production stages. Many features have not been implanted in it since now.
  • less support: Each NoSQL database leads to open source with one or two firms handles it. Mostly they have a smaller startup with a lack of resources to compete on a global scale.
  • Business intelligence: Simple queries need some programming knowledge and most of the business intelligence tools that many entrepreneurs depend on do not provide a connection with the NoSQL database. But there are some tools like a PIG or HIVE that helps in solving this problem.
  • Administration: NoSQL database demands many technical skills. It also demands installation and maintenance. Therefore, it is difficult for users to get a solution without the administration.

Q6. What are the categories of NoSQL databases?

There are four categories of NoSQL databases which are:

  • Key-Value Store – It consists of Big Hash Table of keys & values.
  • Document-based Store- It consists of documents made up of tagged elements.
  • Column-based Store- It consists of columns where each storage block holds data from only one column.
  • Graph-based- It uses edges and nodes to represent and store data.

Q7. How is data in a NoSQL database stored?

It depends on the type of NoSQL database is used. Each database stores the data using different methods like some use column store, some graphs, and some documents, etc. Below is the explanation of each database and how they store the data.

  • Graph stores: It stores the data in the form of graphs.
  • Key-value stores: In this, each item stored with an attribute name along with its value. For example Riak, Berkeley, etc.
  • Wide Column stores: Data is stored in the columns instead of rows. Examples of such data stores are Cassandra and HBase.

Q8. What are examples of NoSQL databases?

Some of the examples of NoSQL databases are:

  • MongoDB
  • CouchDB
  • HBase
  • Oracle NoSQL Database
  • Cassandra DB
  • Riak
  • InfoGrid
  • InfiniteGraph

Q9. What are the differences between the SQL and NoSQL databases?

The major differences between SQL and NoSQL Databases are:

It is primarily called as a non-relational or distributed database. It is called a relational database (RDBMS).
It is horizontally scalable. It is vertically scalable.
It follows the CAP theorem. It follows the ACID properties.
They have a dynamic schema. They have a fixed schema.
Best suitable for hierarchical data storage. This is not suitable for hierarchical data storage.
This is not good for complex queries. This is best for complex queries.

Q10. What do you understand by " Polyglot Persistence " in NoSQL?

Polyglot Persistence refers to handle diverse data storage needs by using different data storage technologies. It can be also said that it is an offshoot of Polyglot programming which use many programming languages to build an application. In short, it uses more than one core database technology.

Q11. What is CAP theorem? How is it applicable to NoSQL systems?

The CAP theorem is known as Brewer's theorem states that a distributed database system can guarantee/ strongly supports only two of the three properties described below.

  • Consistency: This states that every node in a distributed cluster returns the most recent and successful write. It means each client will receive the same view of the data.
  • Availability: Every request gets a response, without the guarantee that it carries the most recent write. In other words, every non-failure node will send the response in a reasonable amount of time to each read and write request.
  • Partition tolerance: The system continues to operate in spite of the loss of messages or failure of the part of the system.

Since, in NoSQL, partition tolerance is a must so there is a tradeoff between availability and consistency. Therefore, it cannot provide consistency and availability together.

About Author :

  • Author of NoSQL interview questions

    Toby Rogers

    Toby Rogers is blogger, Developer and Data Science Expert. He have good understanding of nosql databases, Python, Lisp and Scala Programming Language.

Leave A Comment :

Valid name is required.

Valid name is required.

Valid email id is required.