1.3.2 Flashcards

1
Q

database

A

an organised collection of data that allows for easy:
Adding
Modification
Deletion
Searching

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

relational database

A

2 databases that are linked together to share data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

flat file

definition

A

a single table
can be created very easily using either database or spreadsheet software and is often saved as a CSV file
(used for small and normally personal use details)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

flat file

cons

A

Inefficient and normally has repeated data so:
Take up unnecessary space
Be slow to query
Become difficult to maintain

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

entity relationship diagram

A

1:1 (one-to-one)
1:M (one-to-many)
M:M (many-to-many)

— 1:1
/
— 1:M
\
\ /
— M:M
/ \

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

primary key

A

a unique identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

composite primary key

A

2 or more fields combined

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

secondary key

A

a second field to be indexed (can have repeats)
often used as a search

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

foreign key

A

a relational link
(the same on both databases but one has to be a primary key)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

indexing

A

keeping an index of the primary keys so they can be searched for quickly
each index has the position of its primary key to save time

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

capturing data

A

typically done manually and then has to be read by a computer (normally using a data capture form)
using Optical Character Recognition (OCR)
or
using Optical Mark Recoignition (OMR)
or
chip and pin/barcodes/qr codes/etc…
can now be filled in on a computer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

managing data

A

use SQL (DML) or DBMS to change the data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

selecting data

A

use SQL (QBE) to choose data to see

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

exchange data

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

normalisation

A

splitting tables in a database and arranging the data to move it from 1NF 🡺 2NF 🡺 3NF

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

first normal form

A

All field names must be unique
Values in fields should be from the same domain
Values in fields should be atomic
No two records can be identical
Each table needs a primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

second normal form

A

The data is already in 1NF
Any partial dependencies have been removed

Fix any M:M relationships created as a result

partial dependency means one or more of the fields depend on only part of the primary key
this issue can arise if the primary key is a composite key comprised of more than one field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

third normal form

A

The data is already in 2NF
Any transitive dependencies have been removed (remove any non-key dependencies)

non-key dependency in one where the value of a field is determined by the value of another field that is not part of the primary key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

SQL

A

Structured Query Language
allows for the fast and efficient retrieval, deletion, queries, definition, control and manipulation of data using a simple set of commands

20
Q

SQL - QBE

A

Query by Example
the first graphical query language, making use of visual tables
allows the user would enter commands and conditions

21
Q

SQL - DML

A

Database Manipulation Language
easy ways to:
Add new data
Edit/modify existing data
Delete data

22
Q

SQL - DBMS

A

DataBase Management System
hides the underlying structure of the data and ensures it remains integral by:
Preventing the creation of duplicate primary keys
Enforcing validation rules
Providing secure access
Providing encryption
Providing program data independence
Managing multiple users

23
Q

referntial integrity

A

refers to the accuracy and consistency of data within a relationship

24
Q

transaction processing

A

Any information processing that is divided into individual, indivisible operations (transactions)
Each transaction must succeed or fail as a complete unit (can’t be partially complete)

25
Q

transaction processing - CRUD

A

Create 🡺 INSERT/CREATE
Read 🡺 SELECT
Update 🡺 UPDATE
Delete 🡺 DELETE
All relational databases have certain base functionality

26
Q

A.C.I.D

A

Atomicity
Consistency
Isolation
Durability
ensure data integrity, transaction processing in all DBMSs

27
Q

A.C.I.D - A

A

Atomicity - A change to a database is either completely performed or not at all

28
Q

A.C.I.D - C

A

Consistency - Any change in the database must retain the overall state of the database

29
Q

A.C.I.D - I

A

Isolation - A transaction must not be interrupted by another transaction. The transaction must occur in isolation so other users or processes cannot access the data concerned

30
Q

A.C.I.D - D

A

Durability - Once a change has been made to a database, it must not be lost due to a system failure.
by making sure the DBMS writes the effects of transactions immediately back to permanent secondary storage

31
Q

record locking

A

record(s) being affected by a transaction are locked, effectively placing them in a read-only state
When the transaction is fully completed will the lock be removed
To stop multiple people trying to change the same thing (transactions being interrupted by other transactions)

32
Q

redundancy

A

repetition of the same data

33
Q

table

database

A

entity
file

34
Q

records

database

A

rows
tuples

35
Q

field

database

A

columns
attributes

36
Q

1:1

database relationship example

A

one student has one planner; or
one student planner belongs to one student.

37
Q

1:M

database relationship example

A

one tutor group contains many students; or
many students belong to one tutor group.

38
Q

M:M

database relationship example

A

one student can be taught by many teachers; or
one teacher can teach many students.

not considered a good database design

39
Q

SQL example - show everything from all records where the field ‘name’ is ‘algeria’ from a database called ‘world’

A

SELECT *
FROM world
WHERE name = “Algeria”

40
Q

SQL example - show the ‘continent’ from all records where the field ‘area’ is ‘mexico’ or ‘USA’ from a database called ‘globe’

A

SELECT continent
FROM globe
WHERE area = “mexico” OR area = “USA”

41
Q

SQL example - show everything from all records where the field ‘age’ is 2… and height over 1.5m from a database called ‘people’

A

SELECT *
FROM people
WHERE age LIKE “2%”
AND height > 1.5

42
Q

SQL example - make a new record in a table calle DBtable with value…s and field…s

A

INSERT INTO <DBtable> (<field1>,<field2>,<…>)
VALUES (<value1>,<value2>,<…>)</value2></value1></field2></field1></DBtable>

43
Q

SQL example - make a DELETE command that removes all records from ‘earth’ table with ‘population’ larger than 10,000,000

A

DELETE FROM earth
WHERE population > 10000000

44
Q

SQL example - change the ‘distance’ to 2000m where ‘school’ is edgbarrow in the tables ‘schools’

A

UPDATE schools
SET distance= 2000
WHERE school= “Edgbarrow”

45
Q

SQL example - join 2 tables: ‘group’ and ‘student’ with the common field of tutor with all students in 10V

A

JOIN <student>
ON <group>.<tutor> = <student>.<tutor>
WHERE student.tutor = “10V”</tutor></student></tutor></group></student>

46
Q

SQL example - delete the whole of a table called information

A

DROP TABLE information