1.3.2 Databases Flashcards

You may prefer our related Brainscape-certified flashcards:
1
Q

What is a relational database?

A

A database that recognises the difference between entities, using a different table for each

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

What is an entity?

A

An item about which information is stored

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

What is a flat file database?

A

A database that consists of a single file, usualy one entity

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

What is a primary key?

A

A unique identifier given to each record in a table

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

What is a foreign key?

A

An attribute that links two tables together

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

What is a secondary key?

A

An index other than the primary key used to search and sort through a database with more convenience and speed

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

What is meant by capturing data?

A

The process of getting information to be stored in a database

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

What is meant by selecting data?

A

The process of removing excess information to extract only the data required

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

What is meant by managing data?

A

Manipulating information collected in any way

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

What is the most common language used to manipulate information in databases?

A

Structured Query Language (SQL)

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

What is a one-to-one entity relationship?

A

Each table can only be linked to one other table

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

What is a one-to-many entity relationship?

A

One table can be associated with many other tables

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

What is a many-to-many entity relationship?

A

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

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

How can a many-to-many relationship be created?

A

Creating a third table
Using two one to many relationships to third table

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

What is normalisation?

A

Creating the best possible design for a relational database

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

Give 4 things normalisation tries to accomplish.

A

No redundancy (unnecessary duplicates)
Consistent data throughout linked data
Records can be added/removed without issues
Complex queries can be carried out

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

How is first normal form achieved?

A

No attribute can contain more than a single value

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

How is second normal form achieved?

A

In first normal form
No partial dependencies

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

How is third normal form achieved?

A

In second normal form
No non-key dependencies

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

What is a partial dependency?

A

When an attribute depends on part of the primary key

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

What is a non-key dependency?

A

When an attribute depends on the value of the primary key and nothing else

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

What is indexing?

A

Method that stores the position of each record when ordered by a certain attribute

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

What is indexing used for?

A

Looking up & accessing data quickly

24
Q

State the function of the SELECT statement.

A

Collects fields from a given table

25
Q

State the function of the FROM statement.

A

Specifies which table/tables the information to search is stored

26
Q

State the function of the WHERE statement.

A

Specifies search criteria

27
Q

How can the SELECT, FROM, WHERE statements be used together?

A

SELECT Attributes
FROM Table
WHERE Attribute / Criteria

28
Q

State the function of the ORDER BY statement.

A

Species whether selected data is to be put in ascending/descending order

29
Q

How can the ORDER BY statement be used?

A

ORDER BY Attribute Asc/Desc

30
Q

State the function of the JOIN statement.

A

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

31
Q

How can the JOIN statement be used?

A

SELECT Table1.Attribute1 / Table2.Attribute2 …
FROM Table1
JOIN Table2
ON Table1.Attribute3 = Table2.Attribute3

32
Q

State the function of the CREATE statement.

A

Allows new databases to be made

33
Q

State the function of the SELECT statement.

A

Collects fields from a given table

34
Q

What details must be specified for each attribute when using the CREATE function?

A

Whether or not attribute is primary key
Data type of attribute
Whether attribute needs to be filled in

35
Q

State the function of the ALTER statement.

A

Add, delete or modify columns in a table

36
Q

How is ALTER used to add a column to a table?

A

ALTER TABLE TableName
ADD Attribute & DataTypes

37
Q

How is ALTER used to delete a column to a table?

A

ALTER TABLE TableName
DROP COLUMN Attribute

38
Q

How is ALTER TABLE used to modify a column to a table?

A

ALTER TABLE TableName
MODIFY COLUMN Attribute & DataType

39
Q

State the function of the INSERT INTO statement.

A

Inserts a new record into a table

40
Q

How can the INSERT INTO statement be used?

A

INSERT INTO Column1, Column2
VALUES Value1, Value2

41
Q

State the function of the UPDATE statement.

A

Updates a record in a table

42
Q

How can the UPDATE statement be used?

A

UPDATE TableName
SET Column1 = Value1, Column2 = Value2 …
WHERE Column = Value

43
Q

State the function of the DELETE FROM statement.

A

Deletes a record from a database table

44
Q

How can the DELETE FROM statement be used?

A

DELETE FROM TableName
WHERE Column = Value

45
Q

What is referential integrity?

A

A process that ensures consistency to make sure information isn’t removed if required elsewhere in a linked database

46
Q

What is a transaction?

A

A single operation executed on data

47
Q

What is transaction processing?

A

The processing of information within single transactions in line with ACID

48
Q

What does ACID stand for?

A

Atomicity
Consistency
Isolation
Durability

49
Q

What is meant by Atomicity?

A

A transaction must be processed in its entirety or not at all

50
Q

What is meant by Consistency?

A

A transaction must keep the referential integrity rules between linked tables

51
Q

What is meant by Isolation?

A

Simultaneous execution of transactions must lead to the same result as if they were executed one after the other

52
Q

What is meant by Durability?

A

One a transaction has been completed it will remain so

53
Q

What is record locking?

A

The process of preventing simultaneous access of records in a database

54
Q

What is record locking used for?

A

To prevent inconsistencies or a loss of updates within data

55
Q

What is meant by deadlock?

A

When two or more transactions are waiting indefinitely for one another to give up locks

56
Q

What is meant by redundancy?

A

The process of having one or more copies of data in physically different locations

57
Q

What is the benefit of redundancy?

A

If there is any damage to one copy of data, others can be recovered