SQL Interview Questions and Answers Part-II(SQL Basic Understanding)
Jagdish Chavan
Software Development & Data Science Educator: Android, Python, Java | Bridging Academia & Industry
Hello and Welcome to the article on SQL Interview Questions ad Answers Part-II(SQL Basic Understanding). If you directly landed on this article while looking for interview questions on SQL and Database I will Suggest checking the first article in this series where I tried to explain and answer on the Database link as follow SQL Interview Questions and Answers(Database)
preparing for an upcoming?SQL Interview, you’re at the right place! This blog on SQL Interview Questions has been divided into various sections. Whether you’re a fresher, a developer, or an experienced working professional, there are SQL Interview Questions to meet your needs and help you ace your interview!
Q) What is SQL?
Q) What Can SQL do?
SQL is a Standard-BUT......
Q) What is SQL Process?
When you are executing an SQL command for any RDBMS, the system determines the best way to carry out your request and the SQL engine figures out how to interpret the task.
There are various components included in this process.
These components are-
A classic query engine handles all the non-SQL queries, but a SQL query engine won't handle logical files.
Q) What are ACID Properties in DBMS?
Q) Explain Atomicity?
Atomicity means either the entire transaction takes place at once or doesn’t happen at all. There is no midway i.e. transactions do not occur partially. Each transaction is considered as one unit and either runs to completion or is not executed at all. It involves the following two operations.
Abort: If a transaction aborts, changes made to the database are not visible.
Commit: If a transaction commits, changes made are visible.
Atomicity is also known as the ‘ALL or Nothing Rule’.
Q) Explain Consistency?
This means that integrity constraints must be maintained so that the database is consistent before and after the transaction. It refers to the correctness of a database. Referring to the example above.
Q) Explain Isolation?
This property ensures that multiple transactions can occur concurrently without leading to the inconsistency of the database state. Transactions occur independently without interference. Changes occurring in a particular transaction will be visible to any other transaction until the particular change in that transaction is written to memory or has been committed. This property ensures that the execution of transactions concurrently will result in a start that is equivalent to a state achieved these were executed serially in some order.
Lets X=500, Y=500
Consider two transactions T and T’’.
Suppose T has been executed till reading (Y) and then T” starts.?As a result, interleaving of operations takes place due to which T” reads the correct value of X but the incorrect value of Y and sum compute by
T”: (X+Y=50,000+500=50,500)
领英推荐
Is thus not consistence with the sum at the end of the transaction:
T: (X+Y=50,000+450=50,450)
This results in database inconsistency, due to a loss of 50 units. Hence, transactions must take place in isolation and changes should be visible only after they have been made to the main memory.
Q) What is Durability?
This property ensures that once the transaction has completed execution, the updates and modifications to the database are stored in and written to disk and they persist even if a system failure occurs.
These updates now become permanent and are in non-volatile memory. The effects of the transaction thus are never lost.
The ACID properties, In totality, provides a mechanism to ensure the correctness and consistency of a database in a way such that each transaction is a group of operations that acts as a single unit, produces consistent results, acts in isolation from other operations and updates that it makes are durably stored.
Q) What is the ER Model?
Facts about ER Diagram Model
Q) Q) What are the different components of ER Diagram
Q) What are the best practices for developing an effective ER Diagram
?Q) Explain Database Normalization?
Q) What is MySQL?
Q) What are the advantages of MySQL?
For this article, we will stop here in the next article we are going to learn about the MySql database and its installation.
Show your support by Like, Share and Comment on the article link to the previous article is as follows: SQL Interview Questions and Answers(Database)