1.3.2 Databases

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

1/47

flashcard set

Earn XP

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

48 Terms

1
New cards

What is an entity?

An item of interest about which information is stored

2
New cards

What is a relational database?

A database which recognises the differences between entities

3
New cards

What is a flat file?

A database that consists of a single file, doesn’t necessarily need a primary key

4
New cards

What is a primary key?

A unique identifier for each record in the table, for example CarID for a table of car information

5
New cards

What is a foreign key?

The attribute which links two tables together. Exists as primary in one table and foreign in another.

<p>The attribute which links two tables together. Exists as primary in one table and foreign in another.</p>
6
New cards

What is a secondary key?

Allows a database to be searched quickly, acts as a secondary index to order and search

7
New cards

What is one-to-one database relation?

Each entity can be linked to 1 other entity, such as husband and wife

8
New cards

What is one-to-many database relation?

One entity can be related to many other entities, such as a mother with multiple children

9
New cards

What is many-to-many database relation?

One entity can be associated with many other entities and the same applies the other way round

10
New cards

Entity relationship diagrams

Bird foot diagram

<p>Bird foot diagram</p>
11
New cards

What is normalisation?

Process of coming up with the best possible layout for a relational database

12
New cards

What are the 3 types of normalistation?

First normal form, second normal form and third normal form

13
New cards

What is first normal form?

No attribute that contains more than a single value, as well as no repeating groups of attributes

14
New cards

What is second normal form?

A database which doesn’t have any partial dependencies and is in first normal form.

15
New cards

What is 3rd normal form?

If database is in 2nd form and contains no non-key dependencies it is in third normal form

16
New cards

Ways of capturing data

Manual entry, Magnetic Ink Character Recognition, Optical Mark Recognition, Optical Character Recognition

17
New cards

MICR

Magnetic Ink Character Recognition, used by banks for cheques

18
New cards

OMR

Optical Mark Recognition, used for multiple choice questions on a test

19
New cards

OCR

Optical Character Recognition, used for other forms of responses on tests than multiple choice

20
New cards

Selecting and Managing data

Important part of data pre-processing, involving selecting data that fits a certain criteria to reduce the volume of input

21
New cards

Exchanging data

Transferring the collected data, commonly EDI (electronic data interchange), which requires no human interaction

22
New cards

SQL

Structured query language, declarative language used to manipulate databases

23
New cards

SELECT

Used to collect fields from a given table

24
New cards

FROM

Specifies which table information will come from

25
New cards

WHERE

Specifies the search criteria

26
New cards

ORDER BY

Specifies whether you want it in ascending or descending order

27
New cards

JOIN

Combines rows from multiple tables based on a common field between them

28
New cards

CREATE

Allows you to create new databases

29
New cards

ALTER

Add, delete, modify

30
New cards

UPDATE

Update a record in a database table

31
New cards

DELETE

Delete a record from a database table

32
New cards

Data types

CHAR, VARCHAR, BOOLEAN, INT, FLOAT, DATE, TIME, CURRENCY

33
New cards

Referential Integrity

Process of ensuring consistency, such as making sure data is not removed if it is required elsewhere. No foreign key in one table can reference a non-existence record in a related table.

34
New cards

Transaction processing

Single operation executed on data

35
New cards

ACID

Atomicity, consistency, isolation, durability

36
New cards

Atomicity

Transaction must be completed in its entirety or not at all

37
New cards

Consistency

Must maintain referential integrity rules

38
New cards

Isolation

Simultaneous executions of transactions should lead the to the same result as if they were run one after another

39
New cards

Durability

Once a transaction is executed it will remain so regardless of other circumstances

40
New cards

Record Locking

Preventing simultaneous access to records in a database in order to prevent inconsistencies or loss of updates

41
New cards

Deadlock

Problem with record locking where two or more transactions are waiting for each other to release locks, causing a standstill.

42
New cards

Database

The simplest kind is a flat file, containing information about at least one entity

43
New cards

How are entity descriptions written

Customer (custID, title, firstName, surname. email), where custID is the primary key

44
New cards

Composite primary key

A primary key that consists of two or more attributes to uniquely identify a record in a database table, such as OrderLine (OrderNumber, OrderLine, ProductID)

45
New cards

Timestamp ordering

Deadlock prevention - when a user saves an update if the read timestamp is not the same as it was when they started the transaction then another user has accessed the same object

46
New cards

Commitment ordering

Transactions are ordered in terms of dependencies on one another as well as time they were initiated.

47
New cards

Redundancy

Backup systems which automatically take over when the main system fails

48
New cards