Interview Questions - Data Management
Interview Questions - Data Management
A DBMS that is based on a relational model is called a relational database management system. In this system, data
is stored in tables. Each table represents only one entity and the columns of a table represent the properties of that
entity. Also, each row contains a single record of that entity. In a relational model, two tables are related using the
foreign key values. Relational databases support transaction systems, where each transaction must either happen or
not happen at all. This is because of the ACID properties of relational databases.
Insertion anomaly: It occurs when you insert a data record as a row but the information is not available for
all the columns, causing null values in a row.
Updation anomaly: It occurs when you update information in one row of a table, causing the previous
information to be deleted, as there is no other copy of that data.
Deletion anomaly: It occurs when deletion of one row to remove data from some columns causes the data
in other columns to be deleted as well. This occurs when data about multiple entities is stored in the same
table. If information about one entity is deleted, then the information about another entity in the same
row gets deleted.
Atomicity: This property ensures that either the transaction happens completely or doesn't happen at all. Every
transaction causes some data values in a table to either delete or update. It may also add a new row to the table. It is
necessary that when a transaction happens, either all data values or rows are updated or none of the values is
changed.
Consistency - This property ensures that the data is consistent in every table. Data before and after a transaction is
made must be consistent.
Isolation - If two transactions are happening at the same place, either they should be independent of each other or
one of these transactions must happen first.
Durability - Every transaction must be durable. This means that if a transaction occurs, then the changes made by
this transaction to the database remain even in the event of a system failure.