topic: transaction processing Flashcards

databases (13 cards)

1
Q

what is transaction processing

A

any information that’s divided into individual, indivisible operations called transactions
each transaction must succeed or fail as a complete unit, no partial completions
a sequence of one or more SQL statements run as a single unit of work

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what are the 4 base functionalities
CRUD

A

Create - insert/create
Read - select
Update - update
Delete - delete

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

for data integrity transaction processing in database management systems (DBMS) must conform to

A

ACID
atomicity
consistency
isolation
durability

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

describe what ATOMICITY is in ACID

A

when a change to a database is fully or not at all performed
without it a bank transfer from one account to another could deduct funds from the source but not add funds to the destination

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

describe what CONSISTENCY is in ACID

A

any change in a database must retain the overall state of the database e.g. transferring funds from one bank account to another
so referential integrity is preserved

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

describe what ISOLATION is in ACID

A

transaction must not be interrupted by another transaction, it must occur in isolation so other user cannot access the used data, by using record locking

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

describe what DURABILITY is in ACID

A

once a change in a database is successfully made it must not be lost due to a system failure. e.g. achieved by making DBMS write affects/ outcomes of transaction immediately backed to a permanent secondary storage, unlike a temp volatile storage like main memory (RAM)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

when does data redundancy occur

A

when the same piece of data is stored in 2 or more separate places

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

describe data integrity

A

ensuring that data in a database remans accurate, consistent, and reliable

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

how to ensure data integrity (4)

A

-implementing validation rules
-strict access controls
-robust backups
-automated monitoring to prevent corruption

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

how to ensure data redundancy doesn’t happen

A

-normalization techniques
-use a centralized database (DBMS) that serves as a definitive source for all departments

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

what does record locking prevent … so …

A

allowing multiple users to simultaneously update a database table may cause one of the updates to be lost so…
when a record is updated, the entire record is copied into the user’s own local memory. When the record is saved, the entire record is rewritten to the database

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

why is data redundancy (having data in two or more places in a database is generally NOT a good thing)

A
  1. Increases the size of the database unnecessarily
  2. Causes data inconsistency eg a user’s credit rating in one table is 63, while in another table or database it’s 75
  3. More effort to maintain ie you have to update all instances of that data item
  4. Decreases efficiency of database
  5. May cause data corruption eg when two orders are stored when there should only be one, the data becomes inaccurate
How well did you know this?
1
Not at all
2
3
4
5
Perfectly