Advantages And Disadvantages Of The A In ACID Database Properties

1515 Words4 Pages

: What is the "A" in ACID database properties? Give an example of the use of this property and what might happen if the property is not met
A: The “A” in ACID database properties represents Atomicity. Atomicity is described easily using “all or nothing” i.e, if we consider that the database processes the transactions either it should be fully completed or not at all done. If a single task in a transaction fails then the whole transaction fails. According to this ACID rule, Let us consider two persons John and Bean. When John wants to transfer 1$ from his account to Beans account a Transaction will be performed. This transaction consists of two actions
1, withdrawing 1$ from Johns account.
2, Depositing 1$ to Beans account.
By using this …show more content…

If suppose the system fails before johns transaction is updated in the database then john will be unable to withdraw and Toms account goes to its previous state. If the durability property is not met then even after the transaction is complete and if the system fails then the changes will be lost from the database.
10Q, Describe the general idea of an ORM. What are some advantages and disadvantages of using an ORM for database code?
A: The acronym for ORM is object relational Mapper. The name object relational mapper itself specifies that it is used to map the objects to the database. ORM is just a library written in any language that we use and there is no need to use any sql because we can use interact with the object in the language which we are using.
Advantages of using ORM for database code:
 In ORM the data model is written in a single place so maintainence becomes easier.
 As everything is done automatically it saves a lot of time and cost.
 The main use of ORM is there is no need to use sql
 As we can select our own language it will be flexible to do
 As the model is only done at a single place, changing it becomes easy.
Disadvantages of using ORM for database code:
• Eventhough it’s a library, need to know all the tools about …show more content…

insert into library values(“physics”,1,”john”);
Select query: Select query is used to display the table. select * from library;
Update query: Update query is used to update the data in the table. Update library set book name = “social” where id =3;
Delete query: delete query is used to delete the data from the table. Delete from library where book id = 1;
2Q , What is a covering index and why is it useful. As with all the questions, give an example.
A: A covering index is an index that contains all and more columns that we need for a query. A covering index can satisfy the query without the analysis of data. Using the covering index the rows or columns can be retrieved using criteria. As the covering index contains retrieved columns, the speed will be increased.The improvement of query performance is done with covering index. Now consider the employee table and take the sum of employee salary as the covering index for the employee

More about Advantages And Disadvantages Of The A In ACID Database Properties

Open Document