1.3.2 - Databases Flashcards

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

What is an entity?

A

An item of interest about which information is stored.

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

What is a relational database?

A

A set of tables whose records are linked by certain fields.

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 flat-file database is a database that consists of a single file. It is usually based on a single entity.

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

How is a flat-file database written?

A

Entity(Attribute1, Attribute2, Attribute3)

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

What is a primary key?

A

A unique identifier for each record in a table.

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

How is the primary key shown?

A

It is underlined.

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

What is a foreign key?

A

An attribute that links two tables together.

The foreign key exists in one table as the primary key and acts as the foreign key in another.

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

What is a secondary key?

A

A non-unique but specific identifier that allows data to be searched easier.

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

What is the advantage of using a secondary key?

A

It allows for the database to be searched easier. For example, a patient will probably not know their patient ID but will know their surname.

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

What are the three types of entity relationships?

A

One-to-one

One-to-many

Many-to-many.

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

What is the main feature of a one-to-one entity-relationship?

A

One entity can be linked to only one other entity.

For example, the relationship between a husband and wife.

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

What is the main feature of a one-to-many entity relationship?

A

One entity can be associated with many other entities.

For example, a mother having multiple children.

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

What is the main feature of a many-to-many entity relationship?

A

Multiple entities can be linked to multiple entities.

For example, the relationship between students and courses.

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

What is normalisation?

A

The process of coming up with the best possible layout for a relational database.

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

What does normalisation try to achieve?

A

No redundancy.

Consistent data throughout linked tables.

Complex queries can be carried out.

Records can be added and removed without issues.

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

What are the three types of normalisation?

A

First normal form (1NF)

Second normal form (2NF)

Third normal form (3NF).

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

What are the conditions for first normal form?

A

There must be no attribute that contains more than a single value.

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

What are the conditions for second normal form?

A

It must be in first normal form.

The database must not have any partial key dependencies - no attributes depend on a composite key.

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

What are the conditions for third normal form?

A

It must be in second normal form.

There must not be any non-key dependencies - the attribute only depends on the value of the primary key.

20
Q

Name two ways data is captured.

A

Manual entering.

Magnetic ink character recognition.

Optical mark recognition.

Optical character recognition.

21
Q

What does EDI stand for?

A

Electronic data interchange.

22
Q

What does the ‘SELECT’ syntax do in SQL?

A

It collects fields from a given table.

23
Q

What does the ‘FROM’ syntax do in SQL?

A

It specifies which table the information comes from.

24
Q

What does the ‘WHERE’ syntax do in SQL?

A

It is used to specify the search criteria.

25
Q

What does the ‘ORDER BY’ syntax do in SQL?

A

It specifies whether the data is outputted in ascending or descending order.

26
Q

What does the ‘JOIN’ syntax do in SQL?

A

It provides a method of combining rows from multiple tables based on a common field.

27
Q

What does the ‘CREATE’ syntax do in SQL?

A

Allows new databases to be created.

28
Q

What does the ‘ALTER’ syntax do in SQL?

A

Adds, deletes or modifies the columns in a table.

29
Q

What does the ‘INSERT INTO’ syntax do in SQL?

A

Inserts a new record into a database table.

30
Q

What does the ‘UPDATE’ syntax do in SQL?

A

Used to update a record in a database table.

31
Q

What does the ‘DELETE’ syntax do in SQL?

A

Used to delete a record from a database table.

32
Q

What is the syntax for the ‘CREATE’ function?

A

CREATE TABLE tableName
(
Attribute1 INTEGER NOT NULL, PRIMARY KEY
Attribute2 VARCHAR(20) NOT NULL,

)

33
Q

What is the syntax for the ‘ALTER’ function?

A

ALTER TABLE tableName

MODIFY COLUMN AttributeX NewDataType

34
Q

What is the syntax for the ‘UPDATE’ function?

A

UPDATE tableName
SET column1 = value1, column2 = value2
WHERE columnX = value

35
Q

What is the syntax for the ‘DELETE’ function?

A

DELETE FROM tableName

WHERE columnX = value

36
Q

What is referential integrity?

A

Referential integrity is the process of ensuring consistency. This ensures that information is not used if it is required elsewhere in a linked database.

37
Q

What is a transaction?

A

A transaction is defined as a single operation executed on data.

38
Q

What does ACID stand for?

A

Atomicity, Consistency, Isolation, Durability.

39
Q

What does atomicity mean?

A

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

40
Q

What does consistency mean?

A

A transaction must maintain the referential integrity rules between linked tables.

41
Q

What does isolation mean?

A

Simultaneous executions of transactions should lead to the same result as if they were executed one after the other.

42
Q

What does durability mean?

A

Once a transaction has been executed it will remain so regardless of the circumstances surrounding it, such as in the event of a power cut.

43
Q

What is record locking?

A

The process of preventing simultaneous access to records in a database.

44
Q

What is deadlock?

A

When two records are locked due to them being processed but the records depend on each other for the transaction.

45
Q

What is redundancy?

A

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