Atomicity & Aggregation in Database Management System

Ankita Katdare

Ankita Katdare

@abrakadabra Oct 22, 2024
Let's use this thread to understand the concepts of atomicity and aggregation in DBMS.

Try to explain in simple words with examples.

Replies

Welcome, guest

Join CrazyEngineers to reply, ask questions, and participate in conversations.

CrazyEngineers powered by Jatra Community Platform

  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Dec 21, 2011

    Atomicity - An atom cannot be subdivided further. So should be the transaction.
    Consider a bank transfer account. In that, A transfers 10 to B. So, database'ically',
    Operation #1: 10 is subtracted from A.
    Operation #2: 10 is added to B.
    Atomicity is both these two operations should happen or none should happen. It cannot be only Operation #1 happened or Operation #2 happened. 😀 Both the operations happened is called a Transaction. 😀
  • PraveenKumar Purushothaman

    PraveenKumar Purushothaman

    @praveenkumar-66Ze92 Dec 21, 2011

    Aggregation: There are 7 functions in aggregation in databases. All these can be performed only on multiple rows / data.
    AVG()   - Returns the average value
    COUNT() - Returns the number of rows
    FIRST() - Returns the first value
    LAST()  - Returns the last value
    MAX()   - Returns the largest value
    MIN()   - Returns the smallest value
    SUM()   - Returns the sum