Databases Flashcards

1
Q

What is a database?

A

A database is a large collection of data items and links between them, structured in a way that allows it to be accessed by a number of different application programs.

The term is also used loosely to describe any collection of data.

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

What is a Database Table?

A

A table is the name for each group of similar data with rows for each instance of an entity and columns for each attribute.

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

What is a Record?

A

“[A] Record is the basic unit of data stored in a data file. It is a collection of data items, which may be of different data types, all relating to the individual or object that the record describes and is treated as a unit for processing.”

A record is really a row of data from a database table.

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

What is a key field?

A

“[A] Key is the field within a record used to identify the record.”

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

What is a Field?

A

[A] Field is part of a record designed to hold a single data item of a specified type.

A record is really a column of data from a database table.

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

What is a primary key?

A

A field that uniquely identifies an individual record in a table can be chosen as the Primary Key of the table.

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

What is a composite key?

A

A composite key is one that consists of two or more fields

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

What is a foreign key?

A

When the primary key from one table appears as a field in a second table, it is known as a Foreign Key of the second table.

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

Explain how relationships are used in databases.

A

The way relationships are represented in a relational database involves the use of primary and foreign keys. If the primary key of one table appears as a foreign key in a second table, then we say that there is a relationship or a link between the two tables.

We can see which individual athletes are related to which individual events by cross referencing the values in the respective foreign and primary key fields

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

Definition of a data type

A

“[A] data type is a formal description of the kind of data being stored or manipulated within a program or system, for example CHAR (N), REAL or DATE

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

Explain the data type - CHAR(N)

A

CHAR(N) is string data type, whose values are constrained to have exactly N
characters. For example the following are all CHAR(4): “Fred”, “Fre ”, “Fr d”, “1234”.

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

Explain the data type - TEXT

A

TEXT is a string data type, whose values may have a variable numer of characters.
For example: “Fred”, Fre”, “Fr”, “F”, “Fred12345”.

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

Explain the data type - ENUM

A

ENUM is a string data type, whose values are constrained to be one of a list of
permitted values

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

Explain the data type -INT

A

INT is a numeric data type that can store whole numbers – which may be either
positive or negative. For example: 0, 1, 2, -99.

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

Explain the data type - REAL

A

REAL is a numeric data type that can store numbers with decimal places. For example:
1, 2.718, 3.141, -2.718, -3.141

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

Explain the data type - TIME

A

Time is a data type that can store time values (hours, minutes & seconds). For
example, 03:15:00 (quarter past 3 am)

16
Q

Explain the data type - DATE

A

DATE is a data type that can store dates. The display format can be specified – e.g.
1/1/2017, 1 Jan 2017.

17
Q

Explain the data type - BOOLE

A

BOOLE is a data type that can store the values TRUE and FALSE

18
Q

What is data validation?

A

If incorrect data is entered into a database, the system will be less useful: in some instances it may even be dangerous.

For example, a well designed system ought to be able to prevent a user entering text data into a field that has been designed to store numeric data.

Validation is the automatic checking of data entered into a computer system.

Validation uses the properties of the data to identify any inputs that are obviously wrong.

19
Q

Explain the validation check- Presence Checks

A

It would be meaningless, for example, to attempt a bank withdrawal without specifying an account number. Consequently any form that enables the user to make such a withdrawal must ensure that the account number field is not left blank. This is an example of a presence check.

20
Q

Explain the validation check- Format Checks

A

Some data values are required to conform to given patterns. For example, UK post codes consist of two letters followed by three digits, followed by two letters. Consequently any relevant data entry form should check for this, and reject ill-formed postcodes. This is an example of a format check

21
Q

Explain the validation check- Length Checks

A

The number of characters in a name can vary, but it is difficult to imagine one that is less than three
characters long – or one that is more than twenty characters long. It would be reasonable to reject any
attempted data entry that contains a name that is outside these limits. This is an example of a length check.

22
Q

Explain the validation check- Type Checks

A

In a database that records the number of books in a bookstore, it would be strange to record a fractional number such as 36.4. Consequently any relevant data entry form should ensure that no fractional values are accepted. This is an example of a type check

23
Q

Explain the validation check- Range Checks

A

Human adults come in a range of heights, but it is difficult to imagine anyone shorter than (say) two feet or taller than (say) ten feet. It would be reasonable to reject any attempted data entry contains a height that falls outside of this range. This is an example of a range check

23
Q

What is a logical operator?

A

Comparing a value against other data is a typical operation when data is queried in a database.

Comparison operators allow this to be done. e.g. the comparison operator < indicates that the data entered must be less than a specified value for the result to be correct.

Also used to analyse to values and return a true or false result.

24
Q

What is a form?

A

Forms are a common way to collect data from people, they can be used to enter a new record, modify an existing record or view records already stored in the table.

When data is entered into a form, it is automatically added into the specified table and stored as part of the database.

25
Q

Advantages of forms

A

When there are a number of different tables in a database, forms make it easier to enter data as one form may include fields from different tables.

When the user enters data into the form the database software will ensure the data is stored in the correct table.

They can be used to control the type and format of the data ensuring that it is kept consistent and accurate.

Forms can also be customised to include a logo and colour.

26
Q

What is a Query?

A

A query is a way of searching and extracting data from a database to find the answer to a question.

The query/search checks each record and produces a list of data that satisfies the query criteria.

To create a query, criteria are added to one or more fields in the table.

27
Q

What is a Report?

A

A report allows tables and results from queries to be presented in user-friendly way.

The layout of the report can be customised, making it visually attractive and easy to read for the intended person or organisation.

The data can also be presented by grouping similar data or sorting it in ascending or descending order.

28
Q

What is a Macro?

A

A macro is a small program written to perform a repetitive database task automatically.

In a database, macros allow functionality to be added to both forms and reports such as adding a new record, deleting an old record or updating an existing record.

Instead of entering multiple instructions each time a task is performed, the user only needs to perform a single operation, such as clicking on a button, and the instruction stored within the macro are executed.

29
Q

What is big data?

A

The term Big Data has been used to refer to a range of problems and technologies that relate to the management of very large data sets.

The amount of data that we currently generate is enormous, and is increasing each year.

30
Q

State some sources of big data?

A

text, images and videos uploaded to social media sites

medical records,fitness monitors

financial markets – share price data, currencies, etc.;

31
Q

Explain volume in relation to Big Data?

A

Usually refer to the amount of data, it is difficult to put a size limit in what counts as big data; indeed what was considered big yesterday may not be considered big tomorrow.

It is clear, however, that big data problems involve data sets that are so large and complex that traditional tools, such as relational database management systems, are not able to deal with them effectively.

32
Q

Explain variety in relation to big data

A

Usually refers to the type of data or the way it is structured, much of the data being produced is unstructured – this is not data that can easily be put into relational database tables. It is video, audio, and image, as well as text and numeric data.

33
Q

Explain velocity in relation to big data?

A

Big data problems frequently have to deal with real time flows of data. Events happen in the real world and the data generated is real time, and is often time sensitive. For example:

CCTV Cameras or Stock exchange trades

34
Q

Who interprets big data and how?

A

Data analytics applies algorithms to raw data in order to spot patterns, relationships and trends. The algorithms may include statistical analysis as well as artificial intelligence techniques.

35
Q

What are some applications of analysing big data?

A

Healthcare, Crime prevention combat crime and energy management