SQL Interview Questions

8. What are disadvantages of using Relational Database?

  • Cost – Relational database are quite expensive, small businesses can’t afford and support is expensive too
  • Storage – These requires huge physical storage due to rows and columns structure
  • Tedious Maintenance – With growing volume, the database becomes difficult to maintain
  • Lack of Scalability – When you scale it up in multiple server, there are latency issues, performance issues
  • Lack of Flexibility – These DBs can’t handle large amount of unstructured data.
  • Slow – These are slow in extracting data from database as compared to other databases.

9. What are benefits or advantages of using Non Relational Database or NoSQL Databases?

  • Flexibility – NoSQL database can store data in structured, unstructured and semi-structured format.
  • Scalability – It is easily scalable horizontally using virtual environment and less cost incurred. Ideal for BigData.
  • Freedom of Datatypes– There is no pre-defined schemas so we can adapt to new data types easily for storing of new types of data.
  • Less Code – It requires very few lines of code ideal for developer
  • Easy Database Maintenance – It can automatically partition and replicate data across nodes reducing dependencies on DBA resources.
  • Less Costly – inexpensive commodity hardware can be used to set up cluster of servers to hold large volume of data.
  • High Availability – It does automatic replication of data across data centers, cloud resources or multiple resources and reduce latency significantly for users

10. What are disadvantages of using NoSQL Databases?

  • ACID(Atomicity, Consistency, Isolation, Durability) properties are not supported by NoSQL Databases. They rather depend on ‘eventual consistency’.
  • NoSQL databases are not 100% compatible with SQL
  • NoSQL databases lack standardization, each having own rules of engagement.
  • Lack of database management tools in these type of DBs.
  • They don’t have an uniform programming language, each NoSQL DBs have their own.

11. What are different types of SQL Queries?

  • DDL – Data Definition Language
  • DQL – Data Query Language
  • DML – Data Manipulation Language
  • DCL – Data Control Language
  • TCL – Transaction Control Language
DDL QueriesDQL QueriesDML QueriesDCL QueriesTCL Queries

12. What do you mean by DBMS? What are the different types of DBMS?

A Database Management System (DBMS) Software is designed to store, retrieve, manage and define data in a database. It manages the database engine, database schema and works as an interface between user and database.

Types of DBMS

  • Hierarchical Database
  • Network Database
  • Relational Database
  • Object Oriented Database

Hierarchical – Data is stored in top -down or bottom -up approach. One parent with many children and many children can have only one parent

Network – Many-to-many relationship exist between parent and child tables.

Relational – Deals with normalizing data in rows and columns in a table

Object Oriented – Data is stored in the form of objects.

Go to Page-1, 2 , 3