80 likes | 227 Views
Access Chapter 2 : Relationships and Queries. Michael Lyons mlyons6@mix.wvu.edu February 26, 2014. Relational Database . Allows us to manage groups of data Set rules between tables Join lines enable us to create the relationship between the tables. Relationship window.
E N D
Access Chapter 2:Relationships and Queries Michael Lyons mlyons6@mix.wvu.edu February 26, 2014
Relational Database • Allows us to manage groups of data • Set rules between tables • Join lines enable us to create the relationship between the tables
Relationship window • Primary key and foreign key • Set up as a primary table and related table • Relationship Type • One-to-Many • One-to-One • Many-to-Many • Three types of relationship rules • Enforce Referential Integrity • Cascade Update Related Fields • Cascade Delete Related Records
Query Design • Two parts • Top portion displays tables and relationships • Bottom portion displays fields and criteria • Bottom Portion contains five main categories • Field Row • Table Row • Sort Row • Show Row • Criteria Row
Criteria Types • Delimiter • Pound signs surround data #1/2/03# • Quotations surround text “West Virginia” • Wildcard • Special character that represents unknown characters • ‘*’ and ‘?’ are two types • Like “S*” returns all values that start with ‘S’ • Like “?R*” returns all values with the second letter ‘R’
Comparison Operators • Mathematical Operators • Equal (=) • Not (<>) • Greater than (>) • Less than (<) • Combination Criteria • AND, OR, NOT
Next class… • Chapter 3 • More query features • Calculated fields • Expression Builder • Using functions • Aggregation functions • Grouping data • SUM, AVG, etc • Expressions with aggregation function