Presentation is loading. Please wait.

Presentation is loading. Please wait.

CIS 250 Advanced Computer Applications Introduction to Access.

Similar presentations


Presentation on theme: "CIS 250 Advanced Computer Applications Introduction to Access."— Presentation transcript:

1 CIS 250 Advanced Computer Applications Introduction to Access

2 University of South Alabama - CIS 2502 Basic Database Terms Field – most basic unit of information in a database; a characteristic of an entity (ex: last name, SSN, birth date) Record – set of related fields; all of the information relating to a single entity is contained in a record Table – collection of records; storage unit in a database, holding information about a group of entities

3 University of South Alabama - CIS 2503 Table Organization Tables are organized in a spreadsheet- like format Columns correspond to fields Rows correspond to records

4 University of South Alabama - CIS 2504 Example of Poor Data Storage

5 University of South Alabama - CIS 2505 A Better Solution…

6 University of South Alabama - CIS 2506 Access Objects Tables – storage unit of the database Queries – tool used to select data from one or more tables based on user-specified criteria Forms – created to display information from one or more tables; used for adding, editing or viewing; based on table or query Reports – used to output meaningful information from the database

7 University of South Alabama - CIS 2507 Additional Access Objects Data Access Pages – used to display information from the database in a web page Macros – created to automate common repetitive database tasks such as opening forms or printing reports Modules – created to add additional program code for specific database functions such as event procedures to control behavior of forms and reports and provide responses to user actions

8 University of South Alabama - CIS 2508 Planning Your Database 1. Define your purpose: information to be stored; tasks to be accomplished 2. Plan tables and fields: specify what is to be stored and how data is related; identify and limit duplicated data 3. Plan queries and reorganize data: see if any required data was missed; identify any calculations

9 University of South Alabama - CIS 2509 Planning Steps (cont) 4. Plan forms, pages, and reports: evaluate meaningful information to be extracted; helps ensure all required information has been captured 5. Create the database objects: create tables, add records and organize them; create forms, queries, pages, and reports

10 University of South Alabama - CIS 25010 Building Your Database Must create the database before objects Two methods Blank Database – you must specify everything Template – default objects are already created Asset Tracking, Contact Management, Inventory, Expenses, etc.

11 University of South Alabama - CIS 25011 Creating Objects - Tables Next step is to create tables Based on database dictionary design from planning phase Tables are designed to hold specific information Ex: employee data, student profile information Primary key – unique identifier for a record Not required, but strongly recommended

12 University of South Alabama - CIS 25012 Primary Keys and Foreign Keys Primary key is created during table design If not specified, Access will ask if you wish to create one when table is saved In a relational database, some redundancy is necessary to establish a relationship or an association between two tables Relationships are established through the use of foreign keys – a field that corresponds to a field in another table; not explicit – defined through relationship

13 University of South Alabama - CIS 25013 Creating Tables Fields are defined based on data dictionary Three methods for creating tables: Design view – manually specify all fields and field elements Table Wizard – guides you through the process Import data – table is structured based on data that is imported Each field must have a field name and data type

14 University of South Alabama - CIS 25014 Data Types The data type defines what type of information is to be stored in the field Valid data types include text, number, currency, Yes/No, date/time, memo, autonumber, etc Note: calculated is not a valid data type Default data type is Text

15 University of South Alabama - CIS 25015 Inputting Data Data may be typed in manually through Datasheet View May create a form to display blank fields for data input AutoForm tool – automatically generates form based on table structure May import data from several formats

16 University of South Alabama - CIS 25016 Manipulating Table Data There are several ways to view and sort data From datasheet view, we may wish to display data in a different order Sort allows you to reorder all records: ascending or descending We may only wish to display a subset of records based on a set of criteria Filter by Selection, Filter by Form

17 University of South Alabama - CIS 25017 Filter by Selection and Filter by Form Filter by Selection - Allows you to select all records containing data matching values that appear in the same field as the selected field; based on only one criterion Filter by Form – Allows you to select records by specifying a value in one or more form fields meeting the specified criteria You may save filters as queries for later use

18 University of South Alabama - CIS 25018 Compact and Repair Database may become fragmented Compact and Repair is used to correct those problems as well as resize the database and improve performance Tools, Database Utilities, Compact and Repair

19 University of South Alabama - CIS 25019 Lookup Fields Lookup field – used to access values from a list or from a field in another table Allows user to pick from available options instead of manually inputting information Provide data integrity by reducing data entry errors Create through use of Lookup Wizard when creating a field in your table

20 University of South Alabama - CIS 25020 Relationships A relationship is a logical link between two tables The parent table is the main table in the relationship The child table is the related table

21 University of South Alabama - CIS 25021 Types of Relationships One-to-one – Each record in Table A has only one matching record in Table B and vice versa. One-to-many – This is the most common relationship, where a record in Table A may have multiple records in Table B. However, a record in Table B can have only one record in Table A. Many-to-many – A record in Table A may have many records in Table B and a record in Table B may have many matching records in Table C. This is essentially two one-to-many relationships and is accomplished through use of a junction table.

22 University of South Alabama - CIS 25022 Establishing Relationships Relationships are established through Tools, Relationships This creates a permanent link between the tables Transient links are often used in queries to establish a temporary link

23 University of South Alabama - CIS 25023 Referential Integrity Establishing referential integrity enforces that all child records will have a corresponding parent record When referential integrity is enforced, Access also ensures that relationships are valid Both fields must be of the same data type or referential integrity cannot be enforced Note: this does not prevent an invalid relationship from being created

24 University of South Alabama - CIS 25024 A more complex example

25 University of South Alabama - CIS 25025 Controlling Data Input To ensure the integrity of the data in the database, we can control user input Input Masks – specifies how data is entered and displayed Validation Rule – specifies requirements for data entered Validation Text – used to prompt the user how the data should be entered to be valid These may be specified through the field properties in the table field definition

26 University of South Alabama - CIS 25026 Queries One goal of a database is to allow the user to extract meaningful information A query allows you to view, change, and analyze data based on one or more criteria Similar to a filter, but more advanced Can be stored and will display the current data subset specified upon execution May display information from one or more tables

27 University of South Alabama - CIS 25027 Creating Queries Design View – user manually specifies everything Query Wizard Simple Query Wizard – creates a query based on questions presented in dialog boxes. This query option only pulls data from specific fields in a single table. Crosstab Query Wizard – displays data in a compact, spreadsheet-like format

28 University of South Alabama - CIS 25028 Queries (cont) Queries can be saved and run at any time Can be modified and renamed Query design options: Sort – controls sort order: ascending or descending Show – determine whether a field is displayed in results Criteria – specify criterion record should satisfy to be displayed (or not displayed)

29 University of South Alabama - CIS 25029 Query Criterion May use relational operators, =, =, <> Equal to is default Logical operators AND, NOT, OR Nested operators Other: is, like, in, between, null, is not null May also use Expression Builder to perform calculations

30 University of South Alabama - CIS 25030 Forms Used for data input and display May contain data in table or query Created manually through Design View May use Form Wizard to step you through process Additional formatting controls and utilities may be used to ensure data integrity

31 University of South Alabama - CIS 25031 Controls All information and objects on a form are contained in controls Display data, perform actions, or aesthetics Bound controls – associated with a particular field in a table (e.g. text box displaying a last name) Unbound controls – not linked to a field in a table (e.g. a picture, line around a group of text boxes, label) Calculated controls – use an expression as the source of data

32 University of South Alabama - CIS 25032 List Boxes, Combo Boxes, and Drop- Down List Boxes List boxes – used to display a list at all times Limited to set of alternatives in list Combo box – list box that is not displayed until opened by user; uses less room on form; user may specify additional data values Drop-down list box – same as combo box, but user is limited to only the set of alternatives in the list. Created by specifying Limit to List option

33 University of South Alabama - CIS 25033 Additional Formatting Conditional Formatting – control output based on criteria Used to draw attention to field contents (e.g. displaying all amounts due over $250 in red)

34 University of South Alabama - CIS 25034 Form Sections Form Headers and Footers may be used to display titles, graphics, or other items at top/bottom of form page Background colors and other common elements may also be modified Detail section contains data stored in table records

35 University of South Alabama - CIS 25035 Subforms Used to show information from related tables Requires relationship to already be established May use SubForm Wizard to create a subform control Useful when displaying detail records relating to a parent record (e.g. expense detail record, employee timecard record)

36 University of South Alabama - CIS 25036 Creating and Modifying Reports Create manually through Design View Form Wizard – prompts for table/field info, grouping levels, layout, etc. If using a query, query must be created first Just as with Form controls, report controls are either bound, unbound, or calculated

37 University of South Alabama - CIS 25037 Parts of Report Layout Report Header Band – only displayed on first page; displays the report name Page Header – info to be displayed on each page of the report; titles of columns and other important information is included in this section Group Header Band – info to be displayed for each group such as a group title Detail band – data from records; info from the table or query

38 University of South Alabama - CIS 25038 Parts of Report Layout (cont) Group Footer band - text and subtotals for a group of records Page Footer – text and data to be placed at bottom of each page such as a date and page number Report Footer – text and data printed at the bottom of the last page in a report; summary info for all groups may be entered in this section

39 University of South Alabama - CIS 25039 Additional Form Controls May create buttons to allow user to perform operations without requiring them to use the toolbars Command buttons to be created: Add a Record, Modify (Save) a Record, Find a Record, Exit (Close) Form Use the Command Button Wizard to create Remember to give your button a meaningful name

40 University of South Alabama - CIS 25040 Menus Menus are basically forms created to allow a user to access your data entry forms and print reports without having to use the toolbar to access those objects Create a blank form, add a title, and create buttons to open each data entry form and to exit the database Again, remember to give your buttons meaningful names

41 CIS 250 Advanced Computer Applications Introduction to Access


Download ppt "CIS 250 Advanced Computer Applications Introduction to Access."

Similar presentations


Ads by Google