80 likes | 300 Views
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 (spreadsheet) and design views of each object
E N D
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 (spreadsheet) and design views of each object • Functions of each object in DB window • Tables store information in records and fields • Records are groups of entities stored in rows • Fields are categories of specific information stored in columns
Access • 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
Establishing Table Relationships • Fields that contain common values relate two tables • A common value that resides in both tables links related tables • Primary key: field that contains 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 record in the related table • 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
Database Schema • If we had a DB with these two tables in it, schema for this database would look like this: 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 Takes_these