SQL - interview
Scenario 1: Choosing Between DBMS and RDBMS
You are working on an expanding application that requires numerous users to maintain and access substantial amounts of connected data. You're determining if an RDBMS is necessary or if a traditional DBMS will suffice
Interview Question
Which are the two main shortcomings of traditional DBMS systems ?
Answer:
- One user at a time is normally the only user that conventional DBMS support. They are not appropriate for multi-user scenarios because they do not have concurrency control.
- Absence of Support for Relational Data: DBMS systems do not use tables with relational databases. As a result, managing intricate queries, joins and data integrity becomes more challenging
Tips: For scalability and data integrity, RDBMS SHOULD always be chosen over traditional DBMS when crating systems with numerous users or intricate data linkages.
Scenario 2: Ensuring Reliable Transactions in Banking Systems
You are designing a banking system that processes thousands of money transfers daily. It’s critical that all transactions are fully completed or fully rolled back to avoid inconsistencies.
Interview Question
What do DBMS ACID qualities mean, and what is their significance ?
Answer:
The acronym ACID stands for the four essential characteristics that guarantee transaction dependability:
- Atomicity: The transaction must either finish completely or not. If a component fails, the changes are partially undone.
- Consistency: Transactions must guarantee that the database always move from one legitimate state to another while preserving its integrity.
- Isolation: Every transaction is autonomous. Accuracy is ensured by concurrent transactions not interfering with one another.
- Durability: Even in the event of system malfunctions like crashes, modifications made after a transaction is committed are irreversible.
Tips: For applications (like banking, e-commerce, or healthcare systems) that demand great data reliability, use database that are ACID compliant.