10 - Fundamentals of Databases Flashcards

1
Q

What is a entity?

A

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

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

What is a attribute?

A

An identifier of what data is stored in the entity.

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

What is a primary key?

A

A attribute that uniquely identifies a particular record.

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

What is a composite primary key?

A

When two or more attributes are used to uniquely identify a record.

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

What are the possible relationships between databases?

A

one-to-one
one-to-many
many-to-many

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

What is a foreign key?

A

When the primary key of one table is in another table.

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

What is a flat-file database?

A

Where only one table holds all the data.

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

What is a relational database?

A

Where data is stored on multiple tables.

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

What conditions have to be met for a data to be 1st normalised form ?

A

No repeating attributes
All attributes are atomic.

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

What conditions have to be met for a data to be 2nd normalised form?

A

In 1NF
No partial dependencies on composite key.

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

What conditions have to be met for a data to be 3rd normalised form?

A

In 2NF
No non-key dependencies

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

What is the SQL statement to return certain items?

A

SELECT fields
FROM tables
WHERE conditions

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

What is the SQL statement to organise data returned?

A

ORDER BY (ASC/ DESC)

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

What does the SQL statement LIKE do?

A

WHERE … LIKE …
Selects data that starts/ ends with a certain character. (St*)

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

What does the SQL statement BETWEEN do?

A

WHERE … BETWEEN … AND …
Returns data values between the values given.

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

How do you return data from two tables?

A

FROM table1, table2
WHERE table1.primarykey = table2.foreignkey

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

What is the SQL statement to combine data from multiple tables?

A

JOIN table
ON primarykey = foreignkey
WHERE conditions

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

What is the SQL statement to create a new table?

A

CREATE TABLE name
(data)

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

How do you specify data values when creating a new table?

A

userID CHAR(6) PRIMARY KEY, NOT NULL
name VARCHAR(num)

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

How do you specify a foreign key when creating a new table?

A

FOREIGN KEY name REFERENCES name(table)

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

What are the possible data types for a table? (8)

A

CHAR
VARCHAR
BOOLEAN
INTEGER
FLOAT
DATE
TIME
CURRENCY

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

What is the SQL statement to add a new attribute to a table?

A

ALTER TABLE table
ADD attribute

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

What is the SQL statement to delete an attribute in a table?

A

ALTER TABLE table
DROP attribute

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

What is the SQL statement to add a new record into a table?

A

INSERT INTO table(attributes)
VALUES (values)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
What is the SQL statement to change a record in a table?
UPDATE table SET new values WHERE record
26
What is the SQL statement to remove a record from a table?
DELETE FROM table WHERE record
27
What is the database management system? (DBMS)
A program that controls the data kept in a dataabse.
28
What does the DBMS do?
Maintains the databases integrity by ensuring there is only one version of the data and manages how and where data is stored.
29
What is concurrence?
When multiple users try to access the same data item at the same time.
30
What is record locking?
When a user accesses data a lock is put on that data so no other user can save their version of the data.
31
What is serialisation?
The process of only allowing transactions to take place one at a time.
32
How does DBMS serialise?
Ensures transactions are carried out in the correct sequence and identifies which transactions need serialising.
33
What is timestamp ordering?
Using the timestamps on transactions ti sequence them.
34
What is commitment ordering?
Looks at each command and executes them based n their timestamp and their precedence over the other commands.
35
What is Big Data?
Large or complex datasets that are difficult to store and analyse.
36
What are the three characteristics of big data?
Volume Variety Velocity
37
What does volume mean in terms of big data?
The data cannot be handled by one server.
38
What does variety mean in terms of big data?
The data type of big data is varied and difficult to classify.
39
What does velocity mean in terms of big data?
The data changes and is produced quickly and continuously.
40
What is big data used for?
To analyse trends and make predictions based on the relationships and correlations within the data.
41
Where can big data be seen?
Scientific research Banking Security Weather apps The internet
42
What is latency?
The time delay between a user making a request for data and that data being received.
43
What determines if data is useful?
The data needs to be stored, processed and transmitted to users quickly.
44
What is structured data?
Data that can fit into a standard database structure of fields and records.
44
What are the advantages of structured data?
Makes data easy to organise, store and query.
45
What is unstructured data?
Data that cannot be defined in columns and rows.
46
What is the problem with unstructured data?
It is difficult to analyse the contents of the data.
47
What is machine learning?
Techniques used to automate the process of analysing data.
48
What is machine learning used for?
To find correlations and patterns in data.
49
What are the problems with big data? (6)
Concurrency Difficult to store and analyse Specialised software needed to manage and extract information from the data. Massive storage and processing power Difficult to track every change Can infer the wrong conclusion from data correlation.
50
What is fact-based modelling?
Modelling that identifies the fundamental facts within data which in turn identifies all entities within the data.
51
What is a graph schema?
A method of defining a database.
52
What is a node in a graph schema?
An entity.
53
What are properties in a graph schema?
Items of information stored within each entity.
54
What is a edge in a graph schema?
The relationship between two nodes.
55
What does a solid line represent in a graph schema?
A relationship
56
What does a dotted line represent in a graph schema?
Characteristics
57
What is distributed processing/ computing?
The principle of spreading a large and complex task over several computers or servers.
58
What does a master computer do?
Controls the other computers through the operating system and specialist software.
59
What is distributed programming?
A program specifically written to be used in a distributed processing environment.
60
Why is functional programming used for big data?
The variables are unchanged and their state constant, so there are few side effects, so anytime a user fetches data they always get the original value and the output of their functions will be local to their machine.