Databases Flashcards

1
Q

What is a database

A

A structured, persistent store of data, organised so that it can be easily accessed, managed and updated

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

Describe a field

A
  • Stores a single piece of data
  • Has a specified data type
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Define a record

A

A collection of fields composing an entry in a database

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

Define a table

A

A complete set of records

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

What do databases make it convenient to do

A
  • Access data
  • Update data
  • Search for data
  • Present data in a suitable way
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define flat-file databases

A

Databases in which all data is stored in a single table

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

Define relational databases

A

Consists of multiple tables linked together. Each table usually represents a ‘thing’ or an entity and the link are their relationships

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

Define primary key

A

A field that has a unique value for every record in a table

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

Define foreign key

A

The primary key in one table being used as a field in another table, creating a link

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

Define secondary key

A

A field by which records are likely to be searched and is therefore indexed

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

What is OMR

A

Optical Mark Recognition - A data input method that recognises the positions of marks made on paper

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

What is OCR

A

Optical Character Recognition - A data input method that converts images of text to machine editable text

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

What is a DBMS

A

Database Management System - Software used to control a database, overseeing amendments to its structure, and used to access and amend the data itself

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

Examples of DBMS

A

MySQL, Microsoft Access, PostgreSQL

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

What is SQL

A

Structured Query Language - A language used to find and manipulate data within a database

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

What is normalisation

A

Normalisation - The process of changing the structure of a relational database to remove the potential for data redundancy

17
Q

What does atomic mean

A

A field that cannot be broken down into multiple smaller field

18
Q

What are the rules for 1NF

A
  • Data in every field is atomic
  • No repeating fields
  • Must have a primary key
19
Q

Define composite key

A

A primary key made of two or more fields

20
Q

What are the rules for 2NF

A
  • In 1NF
  • Every field must only depend on all of the primary key
21
Q

What are the rules for 3NF

A
  • In 2NF
  • No fields must depend on any field other than the primary key
22
Q

Explain SELECT … FROM

A

Used to retrieve specified fields from a specified table

23
Q

Explain WHERE

A

Used to filter the results that are returned

24
Q

Explain LIKE

A

Used with WHERE to select fields that match a given pattern
e.g. WHERE Name LIKE ‘New %’;

25
Explain DELETE
Used to delete records e.g DELETE FROM Customers WHERE forename = 'Jason'
26
Explain INSERT
Adds records into a table e.g INSERT INTO Cust (forename, surname) VALUES ('Jason', 'Smith')
27
Explain DROP
Used to delete whole tables e.g DROP TABLE Customer
28
Explain JOIN
Used to combine information. It selects data every time it finds a match between the two specified fields eg SELECT Subject.Subject, Teacher.Teacher FROM Subject INNER JOIN Teacher ON Subject.Teacher_Code = Teacher.Teacher_Code;
29
What is referential integrity
Guaranteeing the consistency of a database by ensuring no record points to another record that doesn't exist
30
What is a transaction
A group of actions in a database creating a unit of work
31
What is ACID
Atomicity, Consistency, Isolation and Durability. These are concepts that underpin database transactions
32
What is atomicity
A change is performed or not performed. Half-finished changes must not be saved
33
What is consistency
Databases have sets of rules that must be adhered to by all the data they contain. Transactions should never leave a database in a state where any of these rules are broken
34
What is isolation
A running transaction must not be able to be affected by a different transaction.
35
What is durability
Once made, transactions cannot be lost. Changes must be written to storage in order to preserve them
36
What does record locking do
Prevents anyone accessing a record in use by another person