Transcript Access
Access
Review
Access
• Access is a database application
• A database is a collection of records and files
organized for a particular purpose
• Objects under DB window: tables, queries, forms,
and reports
• Normal and design views of each object
• Tables store information in records and fields
• Each record is a collection of information about
one specific thing, records stored in rows
• Fields are categories of specific information
stored in columns
Access
• 3 parts of a table:
– Name
– Field specification
– Primary key
• Table in a design view has two panes: Field
pane and Field Properties pane
• A query is a question you ask about the data
stored in your tables or request you make to
perform an action on the data
Access
• Select query retrieves records from one or more
tables using criteria that you specify
• Action query makes changes in the DB to
records that meet the criteria that you specify
• Form is an object designed and used for data
input and/or display, one record at a time
• Report is an object designed and used for
formatting, calculating, summarizing and printing
selected data
Establishing Table Relationships
• Fields that contain common values relate two
tables
• Primary key: field that contain a unique values
can be chosen to be primary key in a table
• Foreign key is a field in the related table that
matches a primary key in the primary table
• The primary table is the table in which the link
field is the primary key
Types of Relationships
• After you decide to relate tables in a DB, you define
the kind of relationships you want to establish
• A one-to-one relationship means that any record in
the primary table can have one related records
• A one-to-many relationship means that any record
in the primary table can have more than one
related record in the related table. For example,
instructor can teach many classes, but each class
is taught by only one instructor
• A many-to-many relationship means each table can
have many related records. For example, a student
is enrolled in many classes and each class has
many students
Tables’ Schema in a Database
• If we had a DB with these two tables
in it, table’s schema would be:
Class
Class_ID
Student_ID
Instructor_name
Grade
Primary key: Class_ID
Student
Student_ID
Last_name
Middle_name
Last_name
Phone_number
Primary key: Student_ID
Entity Relationship Diagram
Class
Takes_these
Student