Task 6: databases (CS)

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

1/25

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.

26 Terms

1
New cards

Database

Structured collection of data, stored electronically in a computer system

Controlled by a database management system (DBSM)

2
New cards

Flat file database

Contains individual, unrelated tables (collections of data)

e.g., excel

3
New cards

Relational database

Contains multiple tables that share related fields (ID, customer)

Use structured query language (SQL) to store, manipulate and retrieve data

e.g., SQLite

4
New cards

Data v

Raw, unorganised facts that need to be processed

5
New cards

Info

Data that is processed, organised, structured or presented in a given context to make it useful

6
New cards

SQL data types

INTEGER - whole

REAL - decimal

Boolean - true/false

TEXT - string

date

  • TEXT as ISO8601 (“yyyy-mm-dd hh:mm:ss.sss”)

  • INTEGER as Unix Time (number of seconds since 1970-01-01 00:00:00 UTC

7
New cards

Relationships

Associations or connections between tables in a relational database

Help organise and structure data, allowing for efficient data retrieval and maintaining data integrity

8
New cards

Related table

Tables that share a relationship

Established using foreign keys, which are columns in a table that refer to the primary key in another table

9
New cards

One-to-one

Each record in Table A is associated with one and only one record in Table B, and vice versa

e.g., Tables ‘users’ and ‘user_profiles’, where each user has a single corresponding profile

10
New cards

One-to-many

Each record in Table A can be associated with multiple records in Table B, but each record in Table B is associated with only one record in Table A

e.g., Tables ‘departments’ and ‘employees’, where each department can have multiple employees, but each employee belongs to one department

11
New cards

Many-to-many

Each record in Table A can be associated with multiple records in Table B, and vice versa

e.g., Tables ‘students’ and ‘courses’, where each student can enroll in multiple courses, and each course can have multiple students

12
New cards

Data anomalies

Inconsistency in data resulting from an operation like an update, insertion or deletion

13
New cards

Normalisation

To reduce the chance of creating data anomalies when modifying database

Minimise or eliminate redundancy

14
New cards

Redundancy

Several, unrelated copies of the same data in the database

15
New cards

Update anomaly

Results from data redundancy and partial update

16
New cards

Delete anomaly

Unintended loss of data due to deletion of other data

17
New cards

Insert anomaly

Inability to add data to the database due to the absence of other data

18
New cards

Composite keys

Creating a primary key by combining more than one attribute

19
New cards

Constraints

Used to limit the type of data that can go into a table

Ensures accuracy and reliability of data

Specified when table is created

e.g., primary key, autoincrement, not null, unique

20
New cards

Data integrity

Accuracy, completeness and quality of data as it’s maintained over time and across formats

e.g., currency, authenticity, relevance, accuracy

21
New cards

Currency

Accurate and up to date

22
New cards

Authenticity

Trustworthy info collected from real life events

23
New cards

Relevance

Degree to which data provides insight into the problem or purpose being addressed

24
New cards

Accuracy

Percentage of errors across the total number of records

25
New cards

Outliers

Data point that differs significantly from other observations that can distort statistical results

26
New cards

Accuracy vs validity

Both seek to describe the quality of usability of a data set

Accuracy - how well the data corresponds to the real world or true value

Validity - how well data values are consistent, based on defined rules