Database Part 1 Flashcards
Outline what data is(2)
Can be several different types (numeric, text, boolean, etc) but only contains RAW FACTS
Unprocessed + no context
Outline what information is (3)
Information = Data + context
Information is interpreted by the user
It is processed and structured
What is a database? (3)
Organised collection of interrelated data connected to a specific topic
Database is created and stored by a piece of software called DBMS
Can use queries to store, retrieve, delete, or edit data in databases written in SQL
What is an information system? (3)
Organised system for collection, organisation, storage and communication of INFORMATION
Made up of 6 components: hardware, software, data, people, network, and process
Wider term than database (it refers to a complete system)
Why use a database?
Define database transactions (2)
multiple operations that are executed sequentially that all serve as a single logical unit of work
Database transactions follow the ACID principles
Explain database transactions (3)
When a database transaction is in flight, the database state may be temporarily inconsistent
But when the transaction is COMMITTED, the changes are applied.
Transaction can only be committed if there are no errors. If there is an error, the database transaction is reverted.
What does ACID refer to?(4)
Atomicity - All tasks in a transaction are performed successfully. Otherwise, the transaction is fully aborted and reverted to former state
Consistency - Data cannot be written that would violate the databases’ own rules for valid data
Isolation - No transactions interfere with each other
Durability - Ensure result/effect of a committed transaction persists in case of a system failure
How is isolation ensured in transactions? (2)
Data is locked for the moment when the transaction is carried out.
Transaction log is created prior to the transaction to allow rollbacks (preparation for an error occuring)
What is data integrity (3)
Refers to 3 things:
- Accuracy - The correct data and relationships are retained and preserved
- Completeness - All necessary data is available
- Consistency
Data integrity is imposed during database design phase
Data integrity is maintained through various error-checking methods and validation procedures
Explain what concurrency is (3)
Process of managing conflicts with simultaneous transactions at the same time. Allows multiple users to affect multiple transactions.
Prevents access by more than one user by locking the contents.
Database concurrency forces ‘sequential updates’ (update to the same piece of data is controlled)
Define data validation
Checks that input matches the expected values in a database
Data validation rules are used in data validation process to ensure validity
Examples: Presence, type, length, format check
Define data verification
Checks that the user does not make a mistake when inputting data
Examples: double keying, 2 phase login
Main difference between data validation and data verification
Data validation is done on original document whereas data verification is done on copies.
What is a query function (2)
A query = request for data from a database
Data requested by query may be generated as results returned by SQL, pictorials, or graphs
What is an update function (2)
ADD, DELETE, UPDATE are all functions that can be performed on a database
UPDATE function is used to modify the existing records in a table
Beneficial functions of DBMS in real life context (4)
Acts as an interface between the user’s view and waay in which data is actually held
Allows users to store/restore/update information
Provides ability to recover database in the event of system failure
Protects from data theft