|
1 |
| -# databases-interview-questions |
| 1 | +<div data-v-5e9078c0="" data-v-b06dc010="" class="QuestionsList"><div data-v-5e9078c0=""><h1 data-v-5e9078c0=""> |
| 2 | + Top 23 Databases interview |
| 3 | + questions and answers in 2021. |
| 4 | + </h1> <p data-v-5e9078c0="" align="center"><a data-v-5e9078c0="" href="https://devinterview.io/"><img data-v-5e9078c0="" src="https://source.unsplash.com/collection/52661698/700x350"></a></p> <p data-v-5e9078c0=""> |
| 5 | + You can check all |
| 6 | + 23 |
| 7 | + Databases interview questions here 👉 |
| 8 | + https://devinterview.io/design/databases-interview-questions |
| 9 | + </p> <br data-v-5e9078c0=""> <div data-v-5e9078c0="" class="unit"><div><h2>🔹 1. What is Normalization?</h2></div> <div><h3>Answer:</h3> <div class="answer"><div><div><div class="AnswerBody"><p>It is the process of eliminating redundant data and maintaining data dependencies.</p></div></div><div class="row my-2"><div><span><i>Source:</i> <span><a href="https://github.com/dhaval1406/SQL" rel="noreferrer" target="_blank" title="What is Normalization? Interview Questions Source To Answer">github.com/dhaval1406</a></span></span> </div></div></div></div></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 2. What are the advantages of NoSQL over traditional RDBMS?</h2></div> <div><h3>Answer:</h3> <div class="answer"><div><div><div class="AnswerBody"><p><strong>NoSQL is better</strong> than RDBMS because of the following reasons/properities of NoSQL:</p><ul><li>It supports semi-structured data and volatile data</li><li>It does not have schema</li><li>Read/Write throughput is very high</li><li>Horizontal <strong>scalability</strong> can be achieved easily</li><li>Will support Bigdata in volumes of Terra Bytes & Peta Bytes</li><li>Provides good support for Analytic tools on top of Bigdata</li><li>Can be hosted in cheaper hardware machines</li><li>In-memory caching option is available to increase the performance of queries</li><li>Faster development life cycles for developers</li></ul><p>Still, <strong>RDBMS is better</strong> than NoSQL for the following reasons/properties of RDBMS:</p><ul><li>Transactions with <strong>ACID</strong> properties - Atomicity, Consistency, Isolation & Durability</li><li>Adherence to <strong>Strong Schema</strong> of data being written/read</li><li>Real time query management ( in case of data size < 10 Tera bytes )</li><li>Execution of complex queries involving <strong>join</strong> & <strong>group by</strong> clauses</li></ul></div></div><div class="row my-2"><div><span><i>Source:</i> <span><a href="https://stackoverflow.com/questions/4160732/nosql-vs-relational-database" rel="noreferrer" target="_blank" title="What are the advantages of NoSQL over traditional RDBMS? Interview Questions Source To Answer">stackoverflow.com</a></span></span> </div></div></div></div></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 3. Define ACID Properties</h2></div> <div><h3>Answer:</h3> <div class="answer"><div><div><div class="AnswerBody"><ul><li><strong>Atomicity</strong>: It ensures all-or-none rule for database modifications.</li><li><strong>Consistency</strong>: Data values are consistent across the database.</li><li><strong>Isolation</strong>: Two transactions are said to be independent of one another.</li><li><strong>Durability</strong>: Data is not lost even at the time of server failure.</li></ul></div></div><div class="row my-2"><div><span><i>Source:</i> <span><a href="https://github.com/chetansomani/SQL-Interview-Questions" rel="noreferrer" target="_blank" title="Define ACID Properties Interview Questions Source To Answer">github.com/chetansomani</a></span></span> </div></div></div></div></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 4. What is Denormalization?</h2></div> <div><h3>Answer:</h3> <div class="answer"><div><div><div class="AnswerBody"><p>It is the process of improving the performance of the database by <em>adding</em> redundant data.</p></div></div><div class="row my-2"><div><span><i>Source:</i> <span><a href="https://github.com/dhaval1406/SQL" rel="noreferrer" target="_blank" title="What is Denormalization? Interview Questions Source To Answer">github.com/dhaval1406</a></span></span> </div></div></div></div></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 5. What are the difference between clustered and a non-clustered index?</h2></div> <div><h3>Answer:</h3> <div class="answer"><div><div><div class="AnswerBody"><ul><li>A <strong>clustered index</strong> is a special type of index that reorders the way records in the table are physically stored. Therefore table can have only one clustered index. The leaf nodes of a clustered index contain the data pages. |
| 10 | + </li><li>A <strong>non clustered index</strong> is a special type of index in which the logical order of the index does not match the physical stored order of the rows on disk. The leaf node of a non clustered index does not consist of the data pages. Instead, the leaf nodes contain index rows.</li></ul></div></div><div class="row my-2"><div><span><i>Source:</i> <span><a href="https://github.com/dhaval1406/SQL" rel="noreferrer" target="_blank" title="What are the difference between clustered and a non-clustered index? Interview Questions Source To Answer">github.com/dhaval1406</a></span></span> </div></div></div></div></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 6. How a database index can help performance?</h2></div> <div> |
| 11 | + 👉🏼 Check |
| 12 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 7. When should I use a NoSQL database instead of a relational database?</h2></div> <div> |
| 13 | + 👉🏼 Check |
| 14 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 8. What is Optimistic locking?</h2></div> <div> |
| 15 | + 👉🏼 Check |
| 16 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 9. What Is ACID Property Of A System?</h2></div> <div> |
| 17 | + 👉🏼 Check |
| 18 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 10. What is the cost of having a database index?</h2></div> <div> |
| 19 | + 👉🏼 Check |
| 20 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 11. How does B-trees index work?</h2></div> <div> |
| 21 | + 👉🏼 Check |
| 22 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 12. Explain the difference between exclusive lock and update lock</h2></div> <div> |
| 23 | + 👉🏼 Check |
| 24 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 13. What's the difference between a primary key and a unique key?</h2></div> <div> |
| 25 | + 👉🏼 Check |
| 26 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 14. What Is Sharding?</h2></div> <div> |
| 27 | + 👉🏼 Check |
| 28 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div><div data-v-5e9078c0="" class="unit"><div><h2>🔹 15. What Is BASE Property Of A System?</h2></div> <div> |
| 29 | + 👉🏼 Check |
| 30 | + <a href="https://devinterview.io/design/databases-interview-questions">all 23 answers</a></div> <br><br></div> <div data-v-5e9078c0="" class="end"></div> <br data-v-5e9078c0=""> |
| 31 | + Thanks 🙌 for reading and good luck on your next tech interview! |
| 32 | + <br data-v-5e9078c0=""> |
| 33 | + Explore 3800+ dev interview question here 👉 |
| 34 | + <a data-v-5e9078c0="" href="https://devinterview.io/">Devinterview.io</a></div> <!----></div> |
0 commit comments