Databases Flashcards

1
Q

What is the difference between data and information?

A

Information is data with context

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

What value does data have?

A

Monetary and personal

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

What must data have in order to be useful?

A

Integrity, accuracy, reliability

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

What does accuracy mean?

A

The truth of data

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

What does reliability mean?

A

How much variation in the data for the same thing

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

What does integrity mean?

A

How much the database can be trusted to be complete, accurate and reliable over its lifetime

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

What are the two ways of storing data?

A

Structured or Unstructured. Eg school timetable vs your photos

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

What is a database?

A

A structured collection of data that allows users to extract information easily

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

What are the advantages of structured data?

A

It is easier to find information, add data, update, delete, and maintain integrity

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

How is a database constructed?

A

Key field = Primary Key

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

What is the primary key?

A

The field that uniquely identifies each record in the table. No two primary key records can be the same

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

What are the two types of database?

A

Flat file - data is stored in a single table, each data item is put in manually, which is vulnerable to human error
Relational database - data is stored in multiple tables linked by a common field, usually the primary key. Each field has its own table

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

What is a foreign key?

A

The primary key of one table can be placed in another table

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

What are common data types used by databases?

A

Integer, decimal, date, currency, char, text, Boolean

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

How can a link be created between two databases?

A

The primary key of one table is inserted into a second table as a foreign key, creating a link between the two tables. In SQL, we can write: WHERE student.id = house.id

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

How do you retrieve data from a table using SQL?

A

SELECT column1, column2 FROM table_name WHERE condition

17
Q

How do you order results?

A

SELECT column1, column2 FROM table_name ORDER BY column2 ASC/DESC

18
Q

How do you insert data into a table?

A

INSERT INTO cakes [(flavour, size)] VALUES (chocolate, 5)

19
Q

How do you edit existing data in a table?

A

UPDATE students SET age = 21 WHERE id = 1

20
Q

How do you delete data from a table?

A

DELETE FROM students WHERE age > 18