IB Computer Science SL | Options A - Databases

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/59

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

60 Terms

1
New cards

Data

Raw fact

2
New cards

Information

Data + Context, It is process and structured, and gives meaning to data

3
New cards

Information system

An information system is a combination of hardware, software, data, people, and processes that work together to collect, process, store, and distribute information to support decision-making and operations.

4
New cards

Database

Organized collection of data on a specific topic

Subset of information system.

5
New cards

How are information systems helpful?

1) Present information in a visually organized way

2) Aids decision making

6
New cards

Transaction

Groups together multiple operations into One unit of logical action.

Independent of other transactions.

7
New cards

ACID

Atomicity, Consistency, Isolation, and Durability. These four properties are crucial for ensuring reliable and valid database transactions.

8
New cards

Atomicity

All-or-Nothing, A property of transactions in a dataase that ensures if of part of the transaction doesn’t go through, the entire transaction rolls back to the previous state

9
New cards

Consistency

Ensures that data is in a consistent state from beginning to end of transaction, only valid data is written in the database.

10
New cards

Isolation

Prevents modification of same data item by two different transactions. Ensures that intermediate state of a transaction is invisible to other transactions.

11
New cards

Durability

Ensures that transactions are saved permanently and committed, does not accidentally get deleted.

12
New cards

Example of Atomicity

Imagine a bank transaction where a user transfers $500 from Account A to Account B.

This transaction involves two steps:

  1. Withdraw $500 from Account A

  2. Deposit $500 into Account B

13
New cards

Example of Consistency

When moving money from one account to another, ensures total value of money in both accounts is same from beginning to end of each transaction

14
New cards

Example of Isolation

Imagine two users, User A and User B, both trying to buy the last concert ticket at the exact same time.

When User A starts the transaction, the system locks the ticket row.

User B's transaction must wait until A's finishes (committed or rolled back).

Only one user can successfully book the last ticket.

15
New cards

Example of Durability

When moving money from one account to another, ensures that changes are permanent to each account.

16
New cards

Lost Update Problem

When two users update the same data item, but only one of those changes is recorded in the data.

17
New cards

Temporary Update Problem

When one transaction updates a database item and then the transaction fails for some reason. Meanwhile updated item is accessed by another transaction before it is changed back to its original value.

18
New cards

Incorrect Summary Problem

When calculating an aggregate of items on a database while other transactions are updating these items, the aggregate function may calculate some values before they are updates and therefore give an incorrect sum.

19
New cards

Rollback

Signals that a transaction has ended unsuccessfully

20
New cards

Needs of Data Sharing

1) Allows sharing amongst multiple users

2) Any changes are accessible and visible to all users

3) Allows reliable and consistent database management because of different sets of data shared with users having different levels of permission

4) Scaleability and reusability as operation grows

21
New cards

Verification

Make sure data entering the system matches data at the original source exactly

22
New cards

Double Entry Verification

Method used to ensure data has been entered accurately

Asking the user to input the same data twice and comparing the two entries to confirm they match exactly.

23
New cards

Manually Checking Verification

User manually checks if the data in the computer matches the data in the source document

24
New cards

Look up

Ensures the value entered is from a predefined list (e.g., dropdown)

25
New cards

Range Check

Checks that a value falls between two limits (e.g., age between 0 and 120)

26
New cards

Length Check

Ensures data entered is the correct number of characters (e.g., phone numbers have 8 digits)

27
New cards

Validation

Does not allow any data to be entered to a databsae that does not match a specific set criteria, ensures accurate data input.

28
New cards

Characteristics of RDBMS

1) Normalized so data is not repeated
2) All columns depens on a primary key to identify a column
3) Distinct separation between storage of data and application using them

Characteristics of RDBMS

29
New cards

Data locking

Ensures multiple transactions are happening safely through a row locking mechanism which locks data, which means another database session cannot update that data until the lock is released which unlocks the data and other sessions are then allowed to update that data.

30
New cards

Schema

Logical strucutre of data in a database

31
New cards

Table

Objects that contain all the data in a database

32
New cards

Field(Column)

A field is a single column in a database table that holds one type of data for each record (row) in the table.

33
New cards

Tuple/Row/Record

Object that can contain one or more values

34
New cards

Primary Key

A primary key is a field or combination of fields in a database table that uniquely identifies each record in that table.

35
New cards

Foreign Key

Fields in one table that references the primary key in another table, creating a relationship between the two tables.

36
New cards

Composite Primary Key

Combination of two or more columns that uniquely identify rows in a table.

37
New cards

One-to-one Relationship

A record in the primary key table can be linked to at most one (or zero) record in the related table

38
New cards

One-to-many Relationships

Each record in the first table can be related to multiple records in the second table, but each record in the second table is related to only one record in the first table.

This is the most common type of relationship.

39
New cards

Many-to-many Relationships

Each record in the first table can be related to multiple records in the second table, and vice versa. 

(Requires a third table called junction table because relational systems cannot directly accomodate the relationship.)

40
New cards

Many to One relationship

Multiple records in the first table can be related to only one record in the second table, but each record in the second table is related to multiple records in the first table.

41
New cards

Normalization

Normalization is the process of organizing data in a relational database by dividing large tables into smaller, related tables.

Used to help reduce data redundancy when designing data strictures

42
New cards

Benefits of Normalisation

Reduces data redundancy (no duplicate values stored)

Improves data integrity (less risk of inconsistent data)

Easier to maintain and update

Minimizes update anomalies (insert, update, delete errors)

Supports referential integrity through foreign keys

Improves query reliability (accurate joins across tables)

43
New cards

1NF

1) Data is atomic (Fields store single, indivisible values)

2) Each record has a primary key

3) No repeating groups of attributes

44
New cards

2NF

1NF +

No partial dependencies

45
New cards

3NF

2NF+

No non-key dependencies (Transitive Dependency)

46
New cards

Insertion Anomalies

Attempt to store an attribute value in the database but unable to because the value of another attribute is not known

47
New cards

Deletion Anomalies

When data is lost unintentionally by deleting other data.

48
New cards

Update Anomalies

If data is held in more than one place, and an update is made to only one version of the data.

49
New cards

Characteristics of a normalized database?

  • Eliminates data redundancy

  • Ensures data integrity

  • Organizes data into logical, related tables

  • Uses primary and foreign keys to link data

  • Removes partial and transitive dependencies

  • Supports efficient updates, queries, and maintenance

  • Structures data in stages: 1NF → 2NF → 3NF

50
New cards

Need for Databases in Modern Organisations

  • Data volume and complexity

  • Data accessibility and retrieval

  • Collaboration and concurrency

51
New cards

Table

Collection of related data stored in rows and columns. Each table represents a single entity, such as Students or Orders.

52
New cards

Record

A single row in a table with one instance of the entity

53
New cards

Field

The column of a table that stores one type of data (Name, Age, etc)

54
New cards

Primary Key

A field/mulitple fileds that act as an A unique Identifier for each record in a table

55
New cards

Foreign Key

A filed of one table being he primary key of a different table, establishing a connection between the two

56
New cards

Candidate Key

Any field (or set of fields) that could serve as a unique identifier for a record. One candidate key is chosen as the primary key.

57
New cards

Composite Primary Key

Two or more fields being used as the primary key for a table - Often used in conjunction tables

58
New cards

Join

A database operation that combines rows from two or more tables based on a related column

59
New cards

Query

A function that retrieves or filters data from one or more tables based on specific conditions.

60
New cards

Update

A function that modifies existing data in a database record using a command.