1.3.2 - Databases Flashcards

(54 cards)

1
Q

What is an Entity in a database?

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 database that organizes data into tables, recognizing differences between entities.

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, typically based around 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 typically described?

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 a Primary Key indicated in notation?

A

By underlining the attribute.

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 in one table that is the primary key in another, used to link tables.

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

How is a Foreign Key indicated in notation?

A

Using an asterisk (*).

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

What is a Secondary Key?

A

An attribute used to speed up searching and ordering, but is not unique.

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

Why are Secondary Keys useful?

A

They allow searching on attributes users are likely to know (e.g., surname) rather than a primary key.

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

What are the three types of relationships in Entity Relationship Modelling?

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
12
Q

What is a One-to-one relationship?

A

Each entity is linked to only one other entity (e.g., husband and wife).

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

What is a One-to-many relationship?

A

One entity can be linked to many others (e.g., a mother and her children).

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

What is a Many-to-many relationship?

A

One entity can be linked to many others, and vice versa (e.g., students and courses).

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

How is a One-to-one relationship shown in a diagram?

A

With a single line connecting the entities.

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

How is a One-to-many relationship shown?

A

With a single line and a crow’s foot (branch) on the ‘many’ side.

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

How is a Many-to-many relationship shown?

A

With a crow’s foot (branch) on both sides.

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

What is Normalisation?

A

The process of designing a database to reduce redundancy and improve data integrity.

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

What are the goals of Normalisation?

A

No redundancy, consistent data, easy record addition/removal, support for complex queries.

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

What are the three normal forms?

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
21
Q

What is required for a table to be in First Normal Form (1NF)?

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
22
Q

What is required for a table to be in Second Normal Form (2NF)?

A

It must be in 1NF and have no partial dependencies (no attribute depends on only part of a composite key).

23
Q

What is required for a table to be in Third Normal Form (3NF)?

A

It must be in 2NF and have no non-key dependencies (attributes depend only on the primary key).

24
Q

What is Indexing?

A

A method to store the position of records ordered by an attribute for fast data access.

25
What is the purpose of a Secondary Index?
To make searching and ordering faster on non-primary key attributes.
26
What is Data Capturing?
The process of inputting data into a database.
27
What is MICR and where is it used?
Magnetic Ink Character Recognition; used by banks to read details on cheques.
28
What is OMR?
Optical Mark Recognition; used for reading multiple-choice answer sheets.
29
What is OCR?
Optical Character Recognition; used for converting scanned text into machine-encoded text.
30
What is Data Selection?
The process of choosing only relevant data that fits certain criteria.
31
What is EDI?
Electronic Data Interchange; a method for computers to exchange data without human interaction.
32
What does SQL stand for?
Structured Query Language.
33
What type of language is SQL?
A declarative language.
34
What does the SELECT statement do?
Specifies which columns (attributes) to retrieve from a table.
35
What does the FROM statement do?
Specifies which table(s) to retrieve data from.
36
What does the WHERE clause do?
Filters records based on specified conditions.
37
What does the ORDER BY clause do?
Sorts the result set by a specified column(s).
38
How do you sort in descending order?
Add the keyword DESC after the column name in ORDER BY.
39
What does the JOIN operation do?
Combines rows from two or more tables based on a related column.
40
What does the CREATE statement do?
Creates a new database or table.
41
What does the ALTER statement do?
Adds, deletes, or modifies columns in an existing table.
42
What does INSERT INTO do?
Adds a new record (row) to a table.
43
What does UPDATE do?
Modifies existing records in a table.
44
What does DELETE do?
Removes records from a table.
45
What is Referential Integrity?
A property ensuring consistency; it prevents deletion of data that is referenced by other data.
46
What is a Transaction?
A single operation or a logical unit of work on data.
47
What does ACID stand for?
Atomicity, Consistency, Isolation, Durability.
48
What is Atomicity?
A transaction must be processed completely or not at all.
49
What is Consistency?
A transaction must maintain database rules and integrity.
50
What is Isolation?
Concurrent transactions must not interfere with each other.
51
What is Durability?
Once a transaction is committed, it remains so permanently.
52
What is Record Locking?
Preventing simultaneous access to a record to prevent inconsistencies.
53
What is a Deadlock?
A situation where two or more transactions are waiting for each other to release locks, causing a standstill.
54
What is Redundancy in data management?
Having duplicate copies of data in physically separate locations for backup and recovery.