Option A: Database (CS SL)

studied byStudied by 7 people
0.0(0)
Get a hint
Hint

Data

1 / 45

flashcard set

Earn XP

46 Terms

1

Data

Raw fact that is meaningless on it’s own / unprocessed values

New cards
2

Information

meaningful data that has been interpreted / added context or meaning

New cards
3

Information system

Collection of hardware, software and human resources that work together to transform raw data into useful information

New cards
4

Database

Organized of data stored electronically and is a component of the information system, it is stored in tables as records (rows, data about one particular person / company / item in a database) and fields (column, part of a record and contains a single piece of data for the subject of the record)

Created and stored by a software called DMBS (SQLite, mySQL, SQLserver)

New cards
5

Queries / Commands

store, retrieve, delete and edit data

New cards
6

Why do we use database

  • processing / querying data (search / sort / analyze)

  • generate reports

  • automatically support data validation / data verification when filling the database

  • standardized (used in multiple systems)

  • provides ability to sore a greater number of records compared to a spreadsheet

New cards
7

Data Validation

Checks that input follows rules for the type of input entered

New cards
8

Data Verifiction

Checks that input matches expected values in database

New cards
9

Entity

  • a real world object / person

  • represented by a row

  • referred to as a record / tuple in a database

New cards
10

Table

  • stores a set of related data called records

  • every record has value

  • records in each table share the same fields / types of data

New cards
11

Tuple

Collection of items that may or may not be related to one another

New cards
12

Collection of items that may or may not be related to one another

New cards
13

Primary Key

  • identify a given record

  • distinctive for each record

New cards
14

Foreign Key

  • primary key field in another table

  • connect record in one table to another

New cards
15

Data types

text, char, boolean, int, real, datetime

New cards
16

Secondary / Alternate Key

  • values that can be used as primary key (PK cannot be NULL, but SK can)

  • can have more than 1 SK

New cards
17

Candidate Key

  • Identify each unique record in a database

  • both PK and SK are candidate keys

New cards
18

Composite PK

when one field is not enough to uniquely identify records, but 2 fields together can work as a PK

example: name & birthday

New cards
19

Database Schema

  • defines how data is organized

  • overview of the database

  • organizational chart

New cards
20

Relational Database

  • tables are related to one another

  • each table has a PK

  • columns → attributes

  • rows → records, if none then tuples

New cards
21

Referential Integrity

  • row → identifier / PK

  • relations between table are consistent and logical

New cards
22

Database Management System (DBMS)

set of programs that allow to read, store, change / extract data in a database

example: SQLite, mySQL, PostgreSQL

New cards
23

Components of DBMS

  • data dictionary

  • data safety

  • query processor

  • storage engine

  • concurrency

  • security

New cards
24

Data Dictionary

  • file or set of files that store information about the database and the tables inside

  • manage metadata / metadata repository

New cards
25

Data Safety

backup & recovery, data integrity

New cards
26

Query Processor

accept queries and return appropriate output

New cards
27

Storage Engine

handles, create, read, update and delete operations

New cards
28

Concurrency

allows multiple users to access database; make sure multiple user can’t modify the same data simultaneously

example: row - locking

New cards
29

Security

enforce user policies, include:

  • access rights

  • audit trails: changes made to the data

  • data locking: lock rows that are accessed

  • validation: make sure new data follows rules

  • encryption

  • back ups: update copies

New cards
30

Database Transactions

  • collection of low - level tasks

  • set of SQL statements executed sequentially

  • all operations are performed and if there is an error, changes either made permanent or save changes commited if not partially or reverted or rolled back

New cards
31

ACID

  • Atomicity: all task performed or none

  • Consistency: all data written must be valid

  • Isolation: no transaction will interfere

  • Durability: once transaction is complete, changes are permanent even with system failure

New cards
32

Purpose of transaction

make sure changes don’t run into each other & is permanent

New cards
33

Data Integrity

  • data should be what the user means it to be

  • accuracy, completeness, validity

New cards
34

Data Redundancy

situation where the same piece of data is stored in 2 or more different place

pros:

  • faster data access

  • better protection

cons:

  • data inconsistency (updated at one place)

  • more storage used

New cards
35

Normalization

process where larger tables are divided into smaller tables while ensuring data integrity and reduce data redundancy

New cards
36

Why we use Normalization

  • reduce data redundancy (storage)

  • reduce table complexity (insertion, updates and deletion less error prone

  • make sure data is stored logically (to make querying more efficient)

New cards
37

The 1st Normal Form (1NF)

  • eliminate duplicate columns, multiple types of value

  • create separate tables for each group

New cards
38

The 2nd Normal Forms (NF)

  • meet requirements for 1NF

  • eliminate partial dependency, 2PK, columns dependent on one attribute of a composite PK

New cards
39

The 3rd Normal Form

  • meet requirements for 2NF

  • eliminate transitive dependency (column depending on another column)

New cards
40

Advantages of Normalization

  • less data storage required → lack of duplicates

  • data is more likely to be consistent

  • increased data security → easy to locate

  • operations are conducted more quickly and efficiently due to table structure

  • simpler queries

  • easier to understand as it is logically organized

New cards
41

Anomalies

  • prevented by 2NF

  • three types of anomaly:

    • insertion anomaly: or cannot be inserted due to missing data

    • deletion anomaly: when certain attributes are lost due to deletion of other attributes

    • update anomaly: data only partially updates

New cards
42

Database Administrator (DBA)

ensure that data is performant, secure, and recoverable by: updating database, maintaining security, managing back up procedures, and establishing recovery plan

New cards
43

Database Definition Language (DDL)

  • commands that allow us to define and modify the structure and metadata of a database

  • generate data dictionary

  • only available to DBAs

  • DDL commands: alter, create, drop, truncate, rename

New cards
44

Data Modelling

  • visual representation of a whole / part of an information system

  • helps stakeholders have a shared understanding of a system

  • Three types:

    • conceptual: rough sketch, entities

    • logical: 4 entities, attributes, FK

    • physical: data, data type, attributes, relationship

New cards
45

Advantages of Data Modelling

  • avoid issues:

    • redundancy

    • lack of integrity

    • lack of consistency

  • helps developers develop actual database

  • lack → deficient modelling

New cards
46
<p>ERD (Entity Relationship Diagram)</p>

ERD (Entity Relationship Diagram)

<p></p>
New cards

Explore top notes

note Note
studied byStudied by 46 people
... ago
5.0(1)
note Note
studied byStudied by 12 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(1)
note Note
studied byStudied by 10 people
... ago
5.0(2)
note Note
studied byStudied by 7 people
... ago
5.0(1)
note Note
studied byStudied by 333 people
... ago
5.0(2)
note Note
studied byStudied by 6 people
... ago
5.0(2)
note Note
studied byStudied by 190114 people
... ago
4.8(752)

Explore top flashcards

flashcards Flashcard (107)
studied byStudied by 50 people
... ago
5.0(4)
flashcards Flashcard (28)
studied byStudied by 29 people
... ago
5.0(2)
flashcards Flashcard (26)
studied byStudied by 39 people
... ago
5.0(1)
flashcards Flashcard (31)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (83)
studied byStudied by 4 people
... ago
5.0(1)
flashcards Flashcard (36)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (62)
studied byStudied by 7 people
... ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 29 people
... ago
5.0(1)
robot