0% found this document useful (0 votes)
37 views13 pages

Session 5

The document discusses transactions in data architecture, emphasizing their role in data collection, retrieval, and validation, and outlines the ACID properties (Atomicity, Consistency, Isolation, Durability) that ensure database integrity. It also introduces the Entity-Relationship (ER) model for data modeling, detailing different types of attributes and their representation in ER diagrams. The document highlights the importance of these concepts in maintaining a consistent and reliable database system.

Uploaded by

Ashish Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
37 views13 pages

Session 5

The document discusses transactions in data architecture, emphasizing their role in data collection, retrieval, and validation, and outlines the ACID properties (Atomicity, Consistency, Isolation, Durability) that ensure database integrity. It also introduces the Entity-Relationship (ER) model for data modeling, detailing different types of attributes and their representation in ER diagrams. The document highlights the importance of these concepts in maintaining a consistent and reliable database system.

Uploaded by

Ashish Patel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

MIS: DATA ARCHITECTURE Session-5

TRANSACTIONS IN DATA ARCHITECTURE


In data architecture, data collection, retrieval, and validation requires
transaction
Transactions group a set of tasks into a single execution unit.
Each transaction begins with a specific task and ends when all the
tasks in the group successfully complete.
If any of the tasks fail, the transaction fails.
Therefore, a transaction has only two results: success or failure.
Each transaction performs three operations on the stored data: Insert,
Update and Delete
After transaction, commit and roll-back operations are performed

2
ACID PROPERTIES IN DATA
ARCHITECTURE
In order to maintain consistency in a database, before and
after the transaction, certain properties are followed. These
are called ACID properties.
Atomicity:
Either the entire transaction takes place at once or doesn’t
happen at all.
There is no midway i.e. transactions do not occur partially.
If the transaction fails after completion of T1 but before
completion of T2.( say, after write(X) but before write(Y)), then
amount has been deducted from X but not added to Y.
This results in an inconsistent database state. Therefore, the
transaction must be executed in entirety in order to ensure
correctness of database state.

3
ACID PROPERTIES IN DATA
ARCHITECTURE
Consistency
This means that integrity constraints must be maintained so that the
database is consistent before and after the transaction. It refers to the
correctness of a database. Referring to the example above,
The total amount before and after the transaction must be maintained.
Total before T occurs = 500 + 200 = 700.
Total after T occurs = 400 + 300 = 700.

Therefore, database is consistent. Inconsistency occurs in case T1


completes but T2 fails. As a result T is incomplete.

4
ACID PROPERTIES IN DATA
ARCHITECTURE
Isolation
This property ensures that multiple transactions can occur concurrently
without leading to the inconsistency of database state.
Transactions occur independently without interference.
Changes occurring in a particular transaction will not be visible to any
other transaction until that particular change in that transaction is
written to memory or has been committed.
This property ensures that the execution of transactions concurrently
will result in a state that is equivalent to a state achieved these were
executed serially in some order.

5
ACID PROPERTIES IN DATA
ARCHITECTURE
Durability
This property ensures that once the transaction has completed
execution, the updates and modifications to the database are stored
in and written to disk and they persist even if a system failure occurs.
These updates now become permanent and are stored in non-volatile
memory. The effects of the transaction, thus, are never lost.
The ACID properties, in totality, provide a mechanism to ensure
correctness and consistency of a database in a way such that each
transaction is a group of operations that acts a single unit, produces
consistent results, acts in isolation from other operations and updates
that it makes are durably stored.

6
E-R MODEL FOR DATA MODELLING
It involves Entity
Each entity has attributes
Different entities hold relationship
It requires processing and validations
ER model stands for an Entity-Relationship model. It is a high-level
data model. This model is used to define the data elements and
relationship for a specified system.
It develops a conceptual design for the database. It also develops a
very simple and easy to design view of data.
In ER modeling, the database structure is portrayed as a diagram
called an entity-relationship diagram.

7
EXAMPLE OF ENTITY AND ATTRIBUTES

8
TYPES OF ATTRIBUTES
Key attribute
The attribute which uniquely identifies each entity in the entity set is
called key attribute.
For example, Roll_No will be unique for each student. In ER diagram,
key attribute is represented by an oval with underlying lines.

9
TYPES OF ATTRIBUTES (CONT.)
Composite attribute (e.g., Name)
An attribute composed of many other attribute is called as composite
attribute.
For example, Address attribute of student Entity type consists of
Street, City, State, and Country. In ER diagram, composite attribute is
represented by an oval comprising of ovals.
TYPES OF ATTRIBUTES
Multivalued attribute (e.g. Phone no)
An attribute consisting more than one value for a given entity.
For example, Phone_No (can be more than one for a given student). In
ER diagram, multivalued attribute is represented by double oval.
TYPES OF ATTRIBUTES
Derived attribute (birthdate and age)
An attribute which can be derived from other attributes of the entity
type is known as derived attribute.
e.g.; Age (can be derived from DOB). In ER diagram, derived
attribute is represented by dashed oval.
RELATIONSHIP TYPE AND RELATIONSHIP
SET:
A relationship type represents the association between entity types.
For example, ‘Enrolled in’ is a relationship type that exists between
entity type Student and Course.
In ER diagram, relationship type is represented by a diamond and
connecting the entities with lines.

You might also like