1.3.2 Databases

studied byStudied by 0 people
0.0(0)
Get a hint
Hint

Database

1 / 39

flashcard set

Earn XP

40 Terms

1

Database

Simplest kind is a flat file, consisting of information about a single entity

New cards
2

Entity

A category of object, person, event or thing of interest about which data needs to be recorded

New cards
3

Relational databases

A database which recognises the difference between entities (item of interest about which information is stored) by creating different tables for each entity

New cards
4

Attributes

Characteristics of entities - categories about which data is collected

New cards
5

Flat file database

Database that consists of a single file. Most likely based around a single entity and its attributes. Typically written out as: Entity1(Attribute1, Attribute2, Attribute3 …)

New cards
6

Primary key

Unique identifier for each record in the table that is automatically indexed. Primary key is shown by underling it

New cards
7

Composite Primary Key

Sometimes two or more attributes are needed to uniquely define a record

New cards
8

Foreign key

The attribute which links two tables together. Will exist in one table as the primary key and act as the foreign key in another. Shown using an asterisk

New cards
9

Secondary key

Allows a database to be searched quickly

New cards
10

Entity relationship modelling

Tables can have different kinds of relationships, which depends on how entities are related in the real world

New cards
11

One-to-one entity relationship

Each entity can only be linked to one other entity, such as the relationship between a husband and wife

New cards
12

One-to-many entity relationship

One entity can be associated with many other entities, such as a mother having multiple children

New cards
13

Many-to-many entity relationship

One entity can be associated with many other entities and the same applies the other way round, such as students and courses - each student can enrol in more than one course and each course can have more than one student

New cards
14

Relationship modelling

knowt flashcard image
New cards
15

Normalisation

Process of coming up with the best possible layout for a relational database

New cards
16

What does normalisation try to accomplish?

No redundancy (unnecessary duplicates)

Consistent data

Records can be added and removed without issues

Complex queries can be carried out

New cards
17

First normal form

There must be no attribute that contains more than a single value. No repeating groups of attributes

New cards
18

Second normal form

Database which doesn’t have any partial dependencies and is in first normal form can be said to be in second normal form. This can only occur if the primary key is a composite key

New cards
19

Third normal form

If the database is in second normal form and contains no non-key dependencies, it’s in third normal form. A non-key dependency means the attribute only depends on the value of the primary key and nothing else

New cards
20

Indexing

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; however is almost never queried since it’s not normally remembered. Secondary keys are used to make the table easier and faster to search through on those particular attributes

New cards
21

Capturing data

Data can be input into the database using multiple methods depending on the context, such as Magnetic Ink Character Recognition, Optical Mark Recognition, or Optical Character Recognition

New cards
22

Selecting and managing data

Could involve only selecting data that first a certain criteria to reduce the volume of input. Can alternatively be managed using SQL

New cards
23

Exchanging Data

The process of transferring the collected data

New cards
24

SQL

Structured Query Language:

A declarative language used to manipulate databases

New cards
25

SELECT, FROM, WHERE

SELECT is used to collect fields from a given table and can be paired with FROM to specify which table the information will come from. WHERE can be used to specify the search criteria

New cards
26

ORDER BY

Specifies whether you want it in ascending or descending order. Values are automatically placed in ascending order

New cards
27

JOIN

Provides a method of combining rows from multiple tables based on a common field between them

New cards
28

CREATE

Allows you to make new databases

New cards
29

ALTER

Used to add, delete or modify the columns in a table

New cards
30

INSERT INTO

Used to insert a new record into a database table

New cards
31

UPDATE

Used to update a record in a database table

New cards
32

DELETE

Used to delete a record from a database table

New cards
33

Referential Integrity

The process of ensuring consistency. Ensures information is not removed if it is required elsewhere in a linked database and that no foreign key in one table can reference a non-existent record in a related table

New cards
34

Transaction

A single operation executed on data

New cards
35

ACID (Atomicity, Consistency, Isolation, Durability)

Atomicity: Transaction must be processed in its entirety or not at all

Consistency: Transaction must maintain referential integrity rules between linked tables

Isolation: Simultaneous executions of transaction should lead to the same result

Durability: Once a transaction has been executed it will remain so

New cards
36

Record Locking

Process of preventing simultaneous access to records in a database. Used to prevent inconsistencies or loss of updates. While one person is editing a record it ‘locks’ it to prevent others from accessing the same record

New cards
37

Problems with Record Locking

If two users attempt to update two records a situation can arise where neither can proceed, this is a deadlock

New cards
38

Timestamp Ordering

Deadlock prevention. When a user tries to save an update, if the read timestamp is not the same as it was when they started the transaction then another user has accessed the same object.

New cards
39

Commitment Ordering

Deadlock prevention. Transactions are ordered in terms of their dependencies on one another as well as the time they were initiated. Can be used by blocking one request until another is completed

New cards
40

Redundancy

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

New cards

Explore top notes

note Note
studied byStudied by 4 people
... ago
5.0(1)
note Note
studied byStudied by 94 people
... ago
5.0(1)
note Note
studied byStudied by 433 people
... ago
5.0(3)
note Note
studied byStudied by 33 people
... ago
5.0(1)
note Note
studied byStudied by 28 people
... ago
5.0(1)
note Note
studied byStudied by 32 people
... ago
5.0(2)
note Note
studied byStudied by 11 people
... ago
5.0(1)
note Note
studied byStudied by 29 people
... ago
5.0(1)

Explore top flashcards

flashcards Flashcard (121)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (84)
studied byStudied by 13 people
... ago
5.0(1)
flashcards Flashcard (20)
studied byStudied by 16 people
... ago
5.0(1)
flashcards Flashcard (27)
studied byStudied by 8 people
... ago
5.0(1)
flashcards Flashcard (83)
studied byStudied by 12 people
... ago
5.0(1)
flashcards Flashcard (53)
studied byStudied by 2 people
... ago
5.0(1)
flashcards Flashcard (48)
studied byStudied by 50 people
... ago
5.0(1)
flashcards Flashcard (24)
studied byStudied by 16 people
... ago
5.0(1)
robot