Test 2 Flashcards

(34 cards)

1
Q

Relational Database

A

relationships in the database

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

Database relationships

A

-connects two table in a data base with a common field
-can be shown as a schema diagram

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

Why relationships?

A

-include data from multiple sources
-keep data organized
-reduce data redundancy
-ensure the consistency/accuracy of data

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

Data redundancy

A

two fields repeat the same info

Ex: a number correlating to a specific name

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

Foreign Key

A

a field that connects to the primary key of another table

Order Table: Menu ID
Menu Table: Menu ID

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

Foreign Key Constraints

A

help prevent errors in the data

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

Referential Integrity

A

-Every value of a foreign key field has to be a value of the primary key field
-Must have corresponding values between tables
-Ensures consistency/accuracy

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

What are the two types of referential integrity relationships?

A

-one to many
-one to one

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

One-to-many

A

Each primary key value can show up many times as foreign key

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

One-to-one

A

primary key connected to primary key

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

Subdata sheet

A

-shows the data in the related table
-all records in the related table connected to the record
-if you change data in this view it changes in the related tables

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

Summary queries

A

-calculates statistics about groups of records

-returns the unique number of records

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

Group by field

A

-query groups the query results by this field
-usually applied to categorical fields

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

What happens if group by is applied to multiple fields?

A

-query will group the results by all of the fields
-If all groupings of field A are within field B you will see same results

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

How to approach a problem

A

-Examine the data
-examine the tables
-import each table one at a time
-make adjustments according to question
-define relationships
-create a query for each question

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

Calculated field

A

-field of data that can be created based on the values of other fields

17
Q

Expression

A

-combination of field names, operators, and functions that result in a single value

18
Q

Function

A

formula that returns a value

19
Q

ways to create a calculated field?

A

-builder function
-type formula in empty field

20
Q

Pro/con of builder function

A

-less likely to have format error
-can take a little longer

21
Q

Pro/con of typing formula into empty field

A

-can be faster
-more likely for format error

22
Q

Common functions

A

-date
-pmt
-left
-right
-len

23
Q

date function

A

-calculates number of days between today and the date in the birthdate field

Date()-[birthdate]

24
Q

pmt function

A

-calculates monthly payment

pmt([rate],[term],[loan])

25
Left function
-returns the first two characters of the entry in the last name field left([lastname]),2)
26
Right function
-returns the last three characters of the entry in the last name field Right([lastname],3)
27
Len function
-returns the number of characters of the entry Len([description])
28
Subquery
-create a query using a query -used when certain criteria keeps you from grouping items the way you want
29
Query do NOT
-have same table more than once -have two unrelated tables -have a query and a table in the second step query
30
What do all the query do nots have in common?
-all have the same problem -query will keep running because tables or queries are not related -get many duplicate results
31
At Birmingham’s Best Coffee, your database does not allow your customer to order hamburgers. What is the most likely reason?
Referential integrity
32
In your Access database, it shows an infinity sign on a relationship. What does the infinity sign represent?
the side with foreign key
33
How is a foreign key different from a primary key?
A foreign key ensures referential integrity.
34
To have 5 related tables in a relational database, how many primary-foreign key relationships are needed?
5-1=4 4 relationships