Option A - Databases Flashcards
What is a database?
A database is a system that allows users to store data in a structured way using tables and fields.
It also provides _ means for us to _ the data.
various,access
Data vs Information
Data:1. Raw facts2. Unprocessed3. No context4. Just text and numbersInformation:1. Data+context2. Processed and structured3. Interpreted by the user4. Data is given meaning
Database vs spreadsheet
Spreadsheets are used to manipulate data(using mathematical operations) while databases are used to store data. Databases also have relationships betwen tables and allow the user to make queries to find specific data
Database vs informtion system
Databases contain data that is used by information systems. Informations systems are complete systems that present data as information.
Why are databases needed?
- Data organisation* Data integrity* Data security* Scalability* Perfomance* Data sharing
Elaborate on data organisation.| As part of the question: Why are databases needed?
Help organise data in a structured manner, Allow us to store, retrieve and manipulate data
Elaborate on data integrity.| As part of the question: Why are databases needed?
- provide mechanisms to ensure data is accurate and consistent * Needed when many users/applications access the same data
Elaborate on data security.| As part of the question: Why are databases needed?
- Allow administrators(authorized) to control and access data* this protects sensetive data from unauthorized users
Elaborate on scalabilitity.| As part of the question: Why are databases needed?
can be scaled by organisations who need to handle large amounts of data
Elaborate on perfomance.| As part of the question: Why are databases needed?
- optimized, which allows users to access and manipulate data quickly and efficiently
Elaborate on data sharing.| As part of the question: Why are databases needed?
- they enable sharing which allows collaborations across different systems and applications
What are database transactions?
Logical unit of work consisting of one or many operations that are executed together as a single atomic unit.
Transactions ensure that either _ operations are _ or _ are _ at all.
all,completed,none,executed
Transactions ensure that a _ remains in a _ _ even in the event of _ or _ _.
database,consistent,state,errors,system,failures
Database states refer to the _ of a database at any given _.
condition,time.
States are used to keep track of _ made to the database.
changes
Maintaining _ across _ maintains _.
consistancy,states,integrity.
What are database updates?
updates refer to changes made to the database.
_ operations maintain _ and integrity.
update, consistency
Why are locking mechanisms necessary?
They prevent conflict and inconsistencies.
_ transactions are conducted _.
concurrent,sequentially
Using _ created at _ allows changes to be _
logs,commit,reverted
What are the ACID properties of a database transaction?
Atomicity, consistency,isolation,durability
Explain atomacity.| As part of : What are the ACID properties of a database transactions?
- Atomic: all transactions are executed sucessfully or none are executed at all.* It ensures consistency
Explain consistency.| As part of : What are the ACID properties of a database transactions?
- Ensures a consistent state of the database is maintained before and after a transaction is executed
Explain isolation.| As part of : What are the ACID properties of a database transactions?
- transactions are isolated(changes made by one transaction are not visible to the other until completion)
Explain durability.| As part of : What are the ACID properties of a database transactions?
- Once changes are made they are permanant despite errors or system failure
Define concurrency.
The ability of users to access data simultaneously.
Define concurrency control.
The process of managing concurrent access to maintain consistency and integrity. Involves implementing mechanisms to prevent conflict.
What are the techniques for managing concurrency?
Locking, time-stamping, MVCC
What do locking mechanisms ensure?| As part of: What are the techniques for managing concurrency?
Only one user can make a change at a time. They do this by placing a lock which can not be acessed or modified until it is released.
What is time stamping?| As part of: What are the techniques for managing concurrency?
Assigning a unique timestamp to each transaction. If simultaneous attempts are made to access data, time stamps are used to determine priority.
What is MVCC?
Creating multiple versions of data or a record to allow users/applications to modify simultaneously. Users/applications see a version of the data that reflects the state of the database at the time.| MVCC-multi-version concurrency control.
What are the functions databases need to be perfomed on them?
Query functions and update functions
What are query functions?| As part of: functions databases need to be perfomed on databases
- Used to retrieve specific data or a subset of data which meets a specific criteria* SELECT in SQL and FIND in NoSQL* Allow analysis and reporting
What are update functions?| As part of: functions databases need to be perfomed on them
- Used to modify data in the database* UPDATE and DELETE in SQL and save() and remove() in NoSQL* Essential for maintaining accuracy and integrity of data - allow users to correct errors, update data and remove obsolete data
What is data validation?
Checking whether data entered into a system matches predefined rules and constraints. Ensures that the data entered is correct.
What is data verification?
Process of checking whether data in the database is accurate, complete and consistent. Ensures that data is a true representation of its original source.
Data verification is perfomed on a _ basis.
periodic
Tools for data verification include _ checks, _ tools or a combination of both.
manual, automated
What is a DBMS?
A DBMS is used to store, manage and retrieve data in a structured and organised manner.