Upload
chester-webster
View
213
Download
0
Embed Size (px)
Citation preview
Access
Review
Access
• Access is a database application• A database is a collection of records and files
organized for a particular purpose• Access supports relational database• Objects under DB window: tables, queries,
forms, and reports• Normal and design views of each object• Functions of each object in DB window• Tables store information in records and fields• Each record is a collection of information about
one specific thing, records stored in rows
Access
• Fields are categories of specific information stored in columns
• 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
• Select query retrieves records from one or more tables using criteria that you specify
• An action query makes changes in the DB to records that meet the criteria that you specify
Access
• 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 Student
Class_ID Student_ID
Student_ID Last_name
Instructor_name Middle_name
Grade Last_name
Phone_number
Primary key: Class_ID Primary key: Student_ID
Entity Relationship Diagram
StudentClassTakes_these