Database 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
5
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
6
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
7
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
8
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
9
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
10
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
11
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
12
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
13
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
14
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
15
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
16
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)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
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.

18
Q

Explain the data type - BOOLE

A

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

19
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.

20
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.

21
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

22
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.

23
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

24
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

25
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.

26
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.

27
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.

28
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.

29
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.

30
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.

31
Q

What is a data dictionary?

A

Used by system designers to plan formatting for databases. They store : contents, format, structure and relationships.

Typically it will include names, descriptions, fields, record info on data types, length of each field and validation used

32
Q

What is the purpose of a data dictionary?

A

To provide the implementation team ( third party ) with enough information to allow them to develop the system without prior knowledge

33
Q

What is an entity?

A

A concept in which data can be collected e.g customer, employee
( A Table)

33
Q

What are entity-relationship diagrams?

A

Represents the relation between entities in a database by saying how one entity can relate to many other entities and vice versa

34
Q

How are ERD’s used?

A

Entity-relationship diagrams are used in the design stage to help plan how data will be organised and provide an overview of a system and how it might work.

35
Q

What is an attribute?

A

Can be used to describe the properties of an entity.
(A Field)

35
Q

What is a wireframe?

A

An outline or diagram of an interface.

It shows where all the components of the interface will be located, without creating all the graphics and elements that will appear in the final product

36
Q

What will form design plans do?

A

It will provide detail of what data will be accepted as input, what form fields will be used and what colours, fonts and layouts will be employed

37
Q

What level of detail is generally put into wireframes?

A

Enough detail to allow a third party to develop the appropriate forms and reports.

38
Q

What is a wizard?

A

A software tool which provides step-by-step instructions
during the completion of a task.