1.4.2 Databases (Chp 8) Flashcards

Databases

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

what is a record?

A

A row

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

What is a field?

A

A column

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

What is a database?

A

An organised collection of data

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

What is a flat file?

A

A flat file is a database that consists of one entity. Will usually be based around a single table.

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

What is a relational database?

A

A relational database are two tables entities/ tables that are linked together by a common item of interest as the primary and foreign key.

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

Entity Relationship Diagrams

A

Diagram that shows the relationship between 2 or more tables

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

1:1

A

one to one relationship

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

1:M

A

one to many

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

M:M

A

many to many

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

Primary key

A

unique identifier for each record in the table. Allows each record to be uniquely identified.

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

Secondary key

A

allows database to be searched quickly. User is unlikely to remember the unique primary key, but will remember a certain field i.e. surname. This makes it possible for the user to search.

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

Foreign key

A

attribute that links 2+ tables together. It exists in one table as the primary key and in another table as the foreign key.

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

Capturing

A
  • method is dependent on the context
  • i.e. manually entered in surveys
  • Bank scans checks using Magnetic Ink Character Recognition
  • Optical Mark Recognition
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Selecting and managing data

A
  • selecting the correct data is an important part of data processing.
  • This could involve only selecting data that fits a certain criteria.
  • Collected data can be managed using SQL to sort, restructure, and select certain sections.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is normalization?

A

a technique used to help reduce data duplication in databases. 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
16
Q

Reasons to use normalization

A
  • no redundancy
  • consistent data throughout linked tables
    records can be removed and added without issues
17
Q

1NF rules

A
  • all field names are unique
  • all records are unique
  • each record has a primary key
  • the values in the fields are of the same domain/ type
  • each value is atomic
18
Q

2NF rules

A
  • that the database is in 1NF

- remove any partial dependencies (split the table)

19
Q

3NF rules

A

-that the database is already in 2NF
-remove any transitive data (everything must depend in the primary key and the primary key only.)
(create 1:M relationship - might need a linking table)

20
Q

Multi-user databases

A

Databases can hold vast amount of info and often need to support multiple simultaneous users. Users can be given different access rights to a database. (User Access Levels)
- All these different database queries result in multiple transactions taking place, often at the same time.

21
Q

Transaction processing

A

a transaction is defined as a single operation executed on data.
Transactions must be processed in line with ACID.

22
Q

what does ACID stand for?

A

Atomicity, Consistency , Isolation, Durability

23
Q

Atomicity

A

a transaction must either be processed entirely or not at all.

24
Q

Consistency

A

A transaction must keep the referential integrity rules between linked tables. Will ensure that an illegal transaction will be rejected so that the integrity of the database is upheld.

25
Q

Isolation

A

Will ensure that each transaction will be self contained and dealt with in a way that doesn’t affect others.
-enforced by record locking where the records not being affected are locked, placing them in a read-only state, which is removed once the transaction is complete.

26
Q

Durability

A

Once the transaction has been completed/ executed it will remain. Ensures that data is saved once a transaction has been completed.

27
Q

Referential integrity

A
  • ensures consistency

- this makes sure that information isn’t removed if it required elsewhere in a linked table

28
Q

integrity

A

refers to the validity of the data. The integrity can be damaged by changes to the structure or software bugs.

29
Q

SELECT

A

SELECT fieldnames
FROM tablename
WHERE condition

30
Q

INSERT

A

INSERT INTO tablename (field1, field2)

VALUES (“”,””)

31
Q

DELETE (record)

A

DELETE FROM tablename

WHERE condition

32
Q

UPDATE

A

UPDATE tablename
SET fieldname = “value”, fieldname2 = “”
WHERE condition

33
Q

DELETE (whole table)

A

DROP TABLE tablename

34
Q

JOIN

A

SELECT tablename1.primarykey, tablename2.foreignkey
JOIN tablename1
ON tablename1.primarykey = tablename2.foreignkey

35
Q

Redundancy

A

process of having more than one copies of data in physically different locations. This means that if there is any damage to one copy, the others can be recovered.

36
Q

Indexing

A

Method to store the position of each record when ordered by a certain attribute.
Used to look up and access data quickly
Primary key is automatically indexed
The index takes up extra space in the database