Databases Flashcards

1
Q

What is a database table also known as?

A

An entity or file

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

What is a record in a database? What are they also know as?

A

Records are the rows in a table
Known as rows/tuples

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

What are fields in a database? What are they also known as?

A

Fields are the columns of a table
Also known as columns or attributes

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

What is a flat file database?

A

One that only contains one table

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

What methods are there of inputting data to a database?

A
  • paper based, where a person types into a database based on a form
  • optical text recognition, where a computer reads information
  • optical mark recognition, e.g. multiple choice tests
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What methods are there of retrieving data from a database?

A
  • SQL (SELECT FROM WHERE)
  • QBE (visual tables where the user can enter commands and conditions, not syntax required)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What methods are there of modifying data?

A
  • DML (database manipulation language, using commands such as UPDATE, DELETE, INSERT)
  • DBMS (database management system, hides the structure of the data to ensure integrity)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the methods of exchanging data?

A

For recording data to transfer:
- XML, JSON
- comma separated values (CSV) in a notepad file

For exchanging files:
- memory stick, email etc. (Physical methods)
- Electronic data interchange (EDI), a protocol allowing two databases to interface

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

What are the principles of 1NF?

A
  • All field names must be unique
  • All stored values in a field should be from the same domain (data type)
  • Values in fields should be atomic (only one value)
  • No two records can be identical
  • Each table needs a primary key
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are the principles of 2NF?

A
  • The data is in 1NF
  • Any partial dependencies have been removed (each table should be for one purpose, for example not a table of students and courses)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the principles of 3NF?

A
  • The data is in 2NF
  • Any transitive dependencies are removed (all fields are dependent on the primary key, for example a table of course codes with lecturer names should not have lecturer initials as this is dependent on lecturer name, not course code)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is data integrity?

A

Ensuring the database contents are the same for all users

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

What is referential integrity?

A

Ensuring data is consistent between fields in a relationship

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

What is database atomicity?

A

Database transactions must be fully completed or not at all

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

What is database consistency?

A

A change in the database must be retained by the database

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

What is database isolation?

A

A transaction must not be interrupted by another transaction, it must occur in isolation ensuring other users cannot access the data

17
Q

What is database durability?

A

Once a change has been made, it must not be lost due to a hardware fault

18
Q

How would you do a join in SQL?

A

Select table1.data table2.data
From table1
Join table2
On table1.foreignkey = table2.primarykey
Where table1.field = condition