Midterms 2 Flashcards
Record
A set of field values. A row.
Primary Key
A field or a collection of fields that uniquely identifies each record in a table. Should be unique, minimal, and static.
What is a good example of a good primary key option
SS#
Foreign Key
A field or a collection of fields in one table in which each field value must match the value of the primary key of some table or must be null
Referential Integrity
The constraint specifying that each nonnull foreign key value must match a primary key value in the primary table
Referential Integrity Rules
You can;t add a row containing an unmatched foreign key value and you can’t change or delete a primary key
Entity Integrity
The constraint that says that the primary key can’t be null. For a composite key, none of the individual fields can be null.
Domain Integrity
A rule you specify for a field. Ex: when you choose a data type you impose a constraint on the set of values allowed for a field
Domain
A set of values from which one or more fields draw their actual values
Lookup Field
Lets the user select a value from a list of possible values. You can set the field to only allow values that you specify (That the user can select or from a related table)
Lookup Wizard
Used to create a lookup field and hide columns, select what it displays, select how the values are sorted, and select what is sorted in the field
Where can you find the lookup wizard
In the data type section of the field in design view
Parameter Query
Displays a dialogue box that prompts a user to enter one or more criteria values when the query is run
What would a parameter query used for a report based on a time frame between certain points look like?
[Enter a start date] [Enter an end date]
What happens if you misspell criteria or press ok without entering criteria in a parameter query prompt?
You will get a datasheet without results (blank. No records)
Why would you get a prompt in a query that is not a parameter query and how do you fix it?
If you misspell a field name in a calculation. Fix the calculation to get rid of the prompt
Write a pattern match criteria that will diaply results if a user only enters a letter or doesn’t enter anything
Like “” & [Please enter a city] & “”
=
An exact Match. (optional, this is Access default
Comparison operators
<>, =, , <=, >=, Between…And, In, Like
How would you write a Between…And
Between 10 and 100 (this will include both 10 and 100)
How do you write an In operator?
In(“pit bull”, “yorkie”, “poodle”)
*
A wild card that will match any string of characters before or after the letter you specify
- example
Like “S*” (Starts with S)
?
Matches any one character
? Example
Like “Sa????” (Starts with Sa and has 6 letters total)
#
Matches any single digit
Logical Operators
Multiple selection criteria
AND and OR
AND operator
Narrows down the record selection
OR operator
expands the record selection
Totals queries
Allow you to do summarized data and view it in aggregate form
Aggregate functions
SUM, AVG, MIN, MAX, COUNT, Group by’s
TRUE or FALSE: You can update data in a total’s query
FALSE
Concatenated fields
Allow you to combine the contents of two or more text fields into one
Example of how you would concatenate FirstName and LastName
FullName: FirstName & “ “ & LastName
How would you concatenate a FirstName and City field to say that a person is from a city
Info: FirstName & “ is from “ & City
Data Types
Short Text, Long Text, Number, Date/Time, Currency, AutoNumber, Yes/No, Hyperlink
Short Text
Letters, digits, spaces, and special characters. Used for names, addresses, descriptions, and fields containing digits that are not used in calculations.
Short text field size
0 to 255 characters
Long Text
Letters, digits, spaces, and special characters. Used for long comments and explanations
Long Text Field Size
1 to 65, 535 characters
Number
Positive and negative numbers, digits, a decimal point, commas, a plus sign, and a minus sign. Used for fields that will be used in calculations, except for those involving money
Number field size
1 to 15 digits