1.3.2 database Flashcards

SQL statements not included here; needs to be revised

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

relational database

A

linked tables, each table with record of an entity

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

flat file

A

one table

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

database

A

organised collection of data

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

primary key

A

unique identifier of the entity

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

foreign key

A

field that links to a primary key in a second table

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

secondary key

A

stored for quick access and query searches

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

composite key

A

when 2 unique identifiers are needed to identify the particular record

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

entity

A

object, person, event or thing of interest about which data needs to be record

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

record, attribute

A

record: row
attribute/field : column

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

entity relationship modelling

A

ERM - shows the relationship between entities in a relational database

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

definition of normalisation

A

process used to come up with the best possible design for a database

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

importance of normalisation

A
  • no unnecessary duplication of data
  • data integrity
  • referential integrity
  • small tables→ faster searching and saving storage
  • more maintainable
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

1NF

A
  • no repeating (groups of) ATTRIBUTE
  • attributes should be atomic
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

2NF

A
  • 1NF
  • no partial dependencies: information should all be relating to the primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

3NF

A
  • 2NF
  • no non-key dependency: all attributes should be dependent on the key, and nothing but the key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

indexing

A

store the position of each record ordered by a certain
attribute for quick access

primary key are automatically indexed

17
Q

methods of dealing with data

A

-capturing
-selecting
-managing
-exchanging

18
Q

capturing data

A

inputting data into the database

  1. Paper-based data capture
  2. Optical character recognition (OCR)
  3. Optical mark recognition (OMR)
  4. Magnetic stripes
  5. Chip and pin
  6. Barcodes
  7. QR codes
  8. Sensors
19
Q

selecting data

A
  • SQL: SELECT, FROM, WHERE
  • QBE (Query by Example): visual representation
20
Q

managing data

A
  • DBMS: database management system
    • validation rules
    • encryption
    • manage multiple users at the same time
  • DML: data manipulation language (e.g. SQL)
    • UPDATE
    • DELETE
    • INSERT
    • DROP
21
Q

exchanging data

A

how systems and people exchange the data

formats:
1. CSV
2. XML and JSON

manual methods:
1. Memory stick
2. Optical media
3. Removable hard disk
4. Email
5. Paper-based

automatic methods:
- EDI (Electronic Data Interchange)
- protocol between 2 systems to facilitate the exchange of data (updates every hour)

22
Q

referential integrity

A

ensuring changes are consistent across the table

e.g. if a record is removed, all references should also be removed
e.g. there must be a corresponding primary key for the foreign key in the table

23
Q

transaction processing

A
  • Atomic: transaction size to be as small as possible
  • All-or-nothing: entire process must finish for success, else fail

ACID

24
Q

ACID

A

the rules a DBMS follows for data integrity during transaction process

atomicity: small as possible, entirely or not
consistency: maintain referential integrity
isolation: not interrupted by other users, record locking
durability: changes must be saved, even when system fails

25
Q

record locking

A

only occurs on the relevant record;
to prevent simultaneous access to objects in a database

deadlock could happen->serialisation (timestamp ordering; commitment ordering)

(ACID: consistency)

26
Q

redundancy

A

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

(ACID: durability)

27
Q

use of SQL

A

structured query language: manages relational database

28
Q

referential integrity

A

1)changes are consistent
2) must be a corresponding primary key to foreign key