1.3.2 databases Flashcards

1
Q

What is a relational database?

A

-Recognises the differences between entities by creating different tables for each entity

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

What is a flat file database?

A

Consists of a single file likely based around a single entity and its attributes
“Entity1(Attribute2, Attribute2…)”

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

What is a primary key?

A

-Unique identifier for each record in the table. (Always different)

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

What is a foreign key?

A

-Attribute which links two tables together

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

What is a secondary key?

A

-Allows a database to be searched quickly

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

Entity relationship modelling

A

*One-to-one: Each entity can only be linked to one other entity
*One-to-many: One table can be associated with many other tables
*Many-to-many: One entity can be associated with many other entities and vice versa

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

What is normalisation?

A

The process of coming up with the best possible layout for a relational database, tries to accomplish:
*No redundancy
*Consistent data throughout linked tables
*Records can be added and removed without issues
*Complex queries can be carried out

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

First normal form normalisation

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

Second normal form

A

A database which doesn’t have any partial dependencies and is in the first normal form.
No attributes can depend on part of a composite key

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

Third normal form

A

Database is in second normal form and contains no non-key dependencies
-A non-key dependency means the attribute only 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
11
Q

What is indexing

A

-Method used to store the position of each record ordered by a certain attribute. Used to look up and access data quickly
-Primary key is automatically indexed

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

SQL

A

*Structured Query Language; declarative language used to manipulate databases
*Enables the creating, removing and updating of databases

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

SQL statements

A

*SELECT- collect fields from a given table
*FROM- specifies which table the information will come from
*WHERE- specifies search criteria
*ORDER BY- ascending or descending order (ordered in ascending, changed to descending by adding ‘desc’ to the end of the statement)
*JOIN- provides a method of combining rows from multiple tables based on a common field between them
*CREATE- make new databases

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

Referential integrity

A

-Process of ensuring consistency; ensures that information is not removed if it is required elsewhere in a linked database
-If two database tables are linked, one of these tables cannot be deleted as the other table requires its contents

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

Transaction processing

A

A single operation executed on data

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

ACID

A

*Atomicity- a transaction must be processed in its entirety or not at all
*Consistency- A transaction must maintain the referential integrity rules between linked tables
*Isolation- simultaneous executions of transactions should lead to the same result as if they were executed one after the other
*Durability- 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

17
Q

Record locking

A

Process of preventing simultaneous access to records in a database