Skip to content
Home » Interview Questions » Database Interview Questions

Database Interview Questions

What is Cardinality in Databases?

Cardinality, in the context of databases, is a critical concept that has two primary applications: it pertains to the uniqueness of data elements within a column, and it describes the nature of relationships between different tables.

What is a Non-Repeatable Read Anomaly?

Non-Repeatable Read is a database anomaly that occurs in the context of transactions, which are sequences of database operations that should behave as single, indivisible units of work. Non-Repeatable Read happens when a transaction reads the same row twice, and gets different data each time. This is usually due to another transaction modifying the data after the first read. In this post, we look at this concept in detail and techniques to address this.

What is ACID in database systems?

ACID is a fundamental concept in database systems, standing for Atomicity, Consistency, Isolation, and Durability. These properties ensure reliable processing of database transactions. ACID Properties of Database Systems Atomicity Atomicity ensures that a transaction is treated as a single, indivisible… Read More »What is ACID in database systems?

SQL Injection: Describe what it is with examples

A SQL Injection is a code injection technique that attackers use to exploit vulnerabilities in a web application’s database layer. This vulnerability is often present in a web application when user input is incorrectly filtered for string literals that are used in SQL statements, or when user input is not strongly typed and can unexpectedly execute SQL commands.

The technique allows an attacker to manipulate SQL queries that an application makes to its database, enabling the attacker to view, alter, or delete data that they are not normally authorized to access.