UNIT 4: Exchanging Data Flashcards
(106 cards)
Capturing data
digital (by card)
manual - filling out forms
EH
capturing data - automated methods
- smart card readers
- barcode readers
- scanners
- optical character recognition (OCR)
- optical mark recognition (OMR)
- magnetic ink character recognition
- sensors
Inputting data
once data has been collected it can be transferred to a database
- automaticallly using the DBMS software
- by typing it into a customised form
- importing it from a spreadsheet or file
- using EDI (electronic data interchange) - this is used to transfer data between one computer system and another
What does EDI stand for
Electronic data interchange
EDI
Elecetronic data interchange is the computer to computer exchange of documents such as purchase orders, invoices and shipping documnets between 2 companies or business partners
replaces post, email or fax
all documents must be in a standard format so that the computer can understand them
EDI translation software may be used to translate the EDI format so the data can be input directly to a company database
Transaction processing
in the context of databases a single logical operation is defined as a transaction
it may consist of several operations for example a customer order may consist of several order lines…
- all must be processed
- quantity of each product adjusted on the stock file
- credit card details checked
- payment accepted or rejected
what does ACID stand for
Atomicity, consistency, isolation, durability
ACID
set of properties to ensure that the integrity of the database is maintained under all circumstances
guarentes that transactions are processed reliably
ATOMICITY
this property requires that a transaction is processed in its entirety or not at all
in any situation, including power cuts or hard disk crashes, it is not possible to process only part of a transaction
CONSISTANCY
This property ensures that no transaction can violate any of the defined validation rules
referential integrity, specified when the database is set up, will always be upheld
what is referential integrity
Referential integrity in database management ensures consistency between related tables by maintaining valid relationships between primary and foreign keys. It means that a foreign key in one table (the “child” table) must reference a valid primary key in another table (the “parent” table). This prevents inconsistencies that can arise from orphaned records or mismatched data.
ISOLATION
the isolation property ensures that concurrent execution of transactions leads to the same result as if transactions were processed one after the other
This is crucial in a multi-user database
DURABILITY
this ensures that once a transaction has been committed, it will remain so, even in the event of a power cut
as each part of a transaction is completed, it is held in a buffer on disk until all elements of the transaction are completed
only then will the changes to the database tables be made
Potential problems with multi-user databases
allowing multiple users to simultaneously access a database could potentially cause one of the updates to be lost
for example
- when an item is to be updated, the entire block in which the record is located is read into the user’s own local memory at the workstation
- when the record is saved the block is rewritten to the file server
Record locking
prevents simultaneous access to objects in a database in order to prevent updates being lost or inconsistencies in the data arising
User a record to memeory cahges x address 9.15 to 9.22
user b copies record, changes x balance 9.17 to 9.20
A saves update, B’s changes are lost
user record is locked when a user retrieves if for editing or updating
anyone else attempting to retrieve it is denied access until the transaction is completed or cancelled.
Problems with record locking
if 2 users are attempting to update two records, a situation can arise in which neither can proceed, known as a dead lock
ken is attempting to make a transfer from customers a account to customers b account
meanwhile Paul is attempting to make a transfer from customers b account to customers a account
- keep waiting - both are waiting
Serialisation
the data base management system (DBMS) must prevent such situations from arising
seralisation ensures that transactions do not overlap in time and therefore cannot interfere with each other or lead to updates being lost
what does DBMS stand for
data base management system
seralistaion tehcniques include:
- timestamp ordering
- commitment ordering
Timestamp ordering
every object in the database has a read timestamp and a write timestamp
these are updated whenever an object is read or written
….when a user tries to save an update, if the read timestamp isn’t the same as when they started the transaction, the DBMS knows another user has accessed the same object
a - 9.05 - 9.10
b - 9.06 - 9.10
A cant save update
B does
Commitment ordering
this is another serialisation technique to ensure that no transactions are lost if two clients are simultaneously trying to update a recored
transactions are ordered in terms of their dependencies on one another as well as the time they were initiated
- it can be sued to prevent deadlock by blocking one request until another is completed
Redundancy
many organistions cannot afford to have their computer systems go down for even a short time
many organisations have built in redundancy in their computer systems
duplicate hardware, located in different geographical ares, mirrors every transaction that takes place on the main system
if this fails the back up system automatically takes over
exmaple of referential integirty
Referential integrity ensures that relationships between tables in a database are valid and consistent.
A good example is a hotel booking system where a booking table references a room table. Referential integrity ensures that every booking entry references an existing room ID in the room table, preventing “orphaned” bookings that point to non-existent rooms.
Data transfer and storage
data is constantly being moved around….
Data is constantly being moved around systems and networks
- transfer is usually high speed and accurate
- as distances get longer, transfer is slower and more susceptible to interference
- storage space can be limited