18. Relational Database Concepts Flashcards

(51 cards)

1
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q
A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

CONSTRUCTING TABLES AND FIELDS

define datatype

A

a field property that sets the sort of data that can be stored in the field

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

Text.

Q: How many characters can a Short Text field hold in Access?

A

A: Up to 255 characters

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

The most commonly used datatypes are:

A

Text.
Number
Date and time
Currency
Boolean.

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

Q: Approximately how much data can a Long Text field store?

A

A: Up to about 1 gigabyte

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

Number

The different sizes available for numeric fields are:

A

byte - stores whole numbers from 0 to 255 only

integer - stores whole numbers (positive and negative) from -32,768 to 32,767

long integer - stores whole numbers from around -2,147 million to 2,147 million

double - used for floating point numbers, up to about 15 digits long

decimal - used for fixed point numbers where precision is important (such as scientific
research results).

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

Date and time

Q: What is the default short date format in Access for the UK region?

A

A: dd/mm/yyyy

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

Explain Currency

A

A special type of number preformatted with a currency symbol and set to two decimal places.

16
Q

Explain Boolean.

A

This datatype can only be set to one of two values, true or false, although

it can be formatted as other binary values such as yes/no or on/off.

17
Q

Evaluating the choice of datatypes

Q: Why is choosing the correct datatype important in a database?

A

A: To ensure correct data storage, efficient processing, and minimal storage requirements.

18
Q

Q: If a customer is unlikely to order more than 30,000 items, which datatype is best for a quantity field?

A

A: Integer (not Long Integer)

19
Q: What datatype should be used for telephone numbers?
A: Text
20
RELATIONAL DATABASE STRUCTURES Q: What is a relational database?
A: A database that stores data in multiple tables linked by relationships, usually using key fields.
21
relationships in ERD
one-to-many One-to-one. Many-to-many.
22
One-to-one. Q: What is a one-to-one relationship in a relational database?
A: A relationship where one record in a table is related to only one record in another table, and vice versa.
22
Q: Give a real-life example of a one-to-one relationship in a database.
A: An Employee table linked to a Company Car table, where each employee can have at most one company car.
23
Many-to-many. Q: What is a many-to-many relationship in a relational database?
A: A relationship where one record in the first table can be related to many records in the second table, and vice versa.
23
Q: Give a real-life example of a many-to-many relationship.
A: A Student table and a Subject table, where each student takes many subjects, and each subject has many students.
24
Q: What is a junction (link) table used for in a many-to-many relationship?
A: It acts as a bridge between the two tables, storing pairs of related records (e.g., StudentID and SubjectID).
25
Presence check.-
check that something has been entered in a field.
25
DATA ENTRY AND VALIDATION validations used
Presence check.- Range check. Lookup check List check. Length of data check. Default values.
26
Range check. Q: What is a range check in a database?
A: A validation rule that ensures a numeric input falls within a specified minimum and maximum range.
26
Q: Why is a range check important for numeric fields?
A: It prevents invalid or unrealistic values from being entered, such as negative ages or negative prices.
27
Q: What would be a suitable range check for a field storing a person's age?
A: >= 0 AND <= 120
27
Lookup check. Q: What is a lookup check in a database?
a method of providing input data by either looking it up from another table or by providing a list
28
Q: Why is a lookup check used in relational databases?
A: To make sure that foreign key values entered are valid and exist in the related (primary) table.
29
Q: Give an example of where a lookup check would be used.
A: In an Orders table, selecting a Customer ID from a list of valid customers stored in the Customers table.
30
List check. Q: What is a list check in a database?
A: A type of data validation that restricts input to a fixed set of values, displayed in a drop-down list directly in the table design.
30
Q: How is a list check different from a lookup check?
List Check: Uses a fixed set of values typed directly into the table design. Lookup Check: Retrieves values from another table (dynamic).
31
Q: Where is a list check typically used?
A: When the possible values are limited and unlikely to change, e.g., options like "Male", "Female", "Other" or "Yes", "No".
32
Default values. 💡 What is a Default Value?
A default value is a preset value that automatically fills a field when a new record is created, unless the user enters something different.
32
**Providing help** end-user form should provide some guidance and help for this user. This can include:
Brief written instructions on the form. A way of indicating which fields are mandatory. This is often done by placing an asterisk (*) in the labels for mandatory fields. Control tips. These are small text boxes that pop up when the mouse hovers over the label for a control.
32
Format (picture) check Q: What is a format (picture) check in database design?
A: A validation method that forces text input to follow a specific pattern, using input masks.
32
Q: What does the input mask >L000 mean?
> = make all characters uppercase L = one required letter 0 = three required digits ➡️ Example: A123
33
Q: Input Mask Symbols Summary
0- digit is required 9- optional digit #-optional digit, plus or minus sign or space L-letter is required ?- optional letter A-letter or digit is required a - optional letter or digit &- characters or space required C-optional characters or spaces >- all following characters will be in uppercase <- all following characters will be in lowercase
34
Evaluating Validation Techniques Q: What are the two main goals of data validation in databases?
Ensure data is correct and in the right format. Create an easy-to-use interface for efficient data entry.
35
Q: Why is accurate data entry important in databases?
Incorrect data can cause serious consequences like incorrect deliveries, financial mistakes, or bad management decisions.
36
Q: What can happen if validation is poorly implemented?
Users may be frustrated if valid data is rejected or if they don’t understand the reason for the rejection.