1/62 Introduction to and Using MS Access Database Management and Analysis 2009.4. Yunho Song

Preview:

Citation preview

1/62

Introduction to and Using MS Access

Database Management and Analysis

2009.4.

Yunho Song

2/62

contents

Introduction to and Using MS Access - contents

1. How to install?

2. Getting Started

3. Customize

4. Database Terms

5. Creating a New Database

6. Manage Tables

7. Keys

8. Table Relationships

9. Managing Data

10. Querying a Database

11. Calculated Fields

12. Designing Forms

13. Generating Reports

3/62

1. How to install?

Introduction to and Using MS Access – How to install?

4/62

1. How to install?

Introduction to and Using MS Access – How to install?

5/62

Introduction to and Using MS Access – Getting Started

Microsoft Office Button - performs many of the functions

   The ribbon - panel at the top portion of the document

2. Getting Started

6/62

Introduction to and Using MS Access – Getting Started

  

The ribbon - additional features

2. Getting Started

Home:  Views, Clipboard, Fonts, Rich Text, Records, Sort & Filter, FindCreate: Tables, Forms, Reports, OtherExternal Data: Import, Export, Collect Data, SharePoint ListsDatabase Tools: Macro, Show/Hide, Analyze, Move Data, Database Tools

7/62

Introduction to and Using MS Access – Getting Started

  

Quick Access Toolbar - customizable toolbar

2. Getting Started

8/62

Introduction to and Using MS Access – Getting Started

  

Navigation Pane - displays database objects such as tables, forms, queries, and reports

2. Getting Started

Tabbed Document Window Viewing - opens tables, forms, queries and reports

9/62

Introduction to and Using MS Access – Customize

  

To access customizable options

3. Customize

10/62

Introduction to and Using MS Access – Customize

  

Popular - to personalize your work environment

3. Customize

11/62

Introduction to and Using MS Access – Customize

  

Current Database - to set options

3. Customize

12/62

Introduction to and Using MS Access – Customize

  

Datasheet - to personalize options in the way the datasheet looks

3. Customize

13/62

Introduction to and Using MS Access – Customize

  

Object Designers - to customize the options for creating and modifying database objects in Access

3. Customize

14/62

Introduction to and Using MS Access – Customize

  

Proofing - to change how Access automatically correct and formats the contents of the database and how it indicates errors

3. Customize

15/62

Introduction to and Using MS Access – Customize

  

Advanced - for advanced customization of Access

3. Customize

16/62

Introduction to and Using MS Access – Customize

  

Customize - to add features to the Quick Access Toolbar

3. Customize

17/62

Introduction to and Using MS Access – Database Terms

  

Table - a collection of information arranged in rows and columns

4. Database Terms

18/62

Introduction to and Using MS Access – Database Terms

  

Query - select records from one or more tables in a database so they can be viewed, analyzed, and sorted on a common datasheet

4. Database Terms

19/62

Introduction to and Using MS Access – Database Terms

  

Form - a graphical interface that is used to display and edit data

4. Database Terms

20/62

Introduction to and Using MS Access – Database Terms

  

Report - output of data arranged in the order you specify

4. Database Terms

21/62

Introduction to and Using MS Access – Create a New Database

  

New Database

5. Create a New Database

22/62

Introduction to and Using MS Access – Create a Table

  

Design view - view all the fields with the data types and descriptions

6. Create a Table

23/62

Introduction to and Using MS Access – Create a Table

  

Datasheet view - display the records in a table

6. Create a Table

24/62

Introduction to and Using MS Access – Create a Table

  

Adding new Fields - New fields can be added in the Datasheet View or in the Design View

6. Create a Table

25/62

Introduction to and Using MS Access – Create a Table

  

6. Create a Table

Adding new Fields - To add a new field in Design View

26/62

Introduction to and Using MS Access – Create a Table

  

6. Create a Table

Data types - When you create a new field in a database you should closely match the data type to what will be entered into the field

Text Text, number, or a combination up to 255 characters

MemoSimilar to the text field, can contain text, numbers, or a combination up to 2 GB of data

Number Numbers up to 16 bytes of data

Date/Time Date and Time information

Currency Currency up to 8 bytes and precise to 4 decimal places

AutoNumberAccess creates a unique number for each new record.  This is often the primary key for the table

Yes/No Yes and No, stored as -1 for yes and 0 for no

OLE Object Images, documents, graphs up to 2 GB

Hyperlink Web addresses

Attachment Attachments such as images, spreadsheets, documents, and charts

27/62

Introduction to and Using MS Access – Create a Table

  

6. Create a Table

Editing Data Types in Fields - define the data types of the tables to most closely match the type of data that will be entered in the field

28/62

Introduction to and Using MS Access – Create a Table

  

6. Create a Table

Editing Data Types in Fields - To edit the Data Type in the Design View

29/62

Introduction to and Using MS Access – Manage Tables

  

6. Manage Tables

Delete a Table Rename a Table

30/62

Introduction to and Using MS Access – Manage Tables

  

6. Manage Tables

Add a Description to a table

31/62

Introduction to and Using MS Access – Keys

  

7. Keys

Primary Key - The primary key is a unique identifier for a record.  The primary key cannot be the same for two records.  This field can never be blank

Foreign Key - A foreign key is a field or combination of fields that are related to the primary key of another table

Composite Key - A composite key is a primary key that is comprised of two or more fields.  It can also be called a compound or concatenated key

32/62

Introduction to and Using MS Access – Table Relationships

8. Table Relationships

Creating Table Relationships

Select desired tables

33/62

Introduction to and Using MS Access – Table Relationships

8. Table Relationships

Creating Table Relationships

Print a Table Relationship

34/62

Introduction to and Using MS Access – Table Relationships

8. Table Relationships

One-to-One Relationship - between two tables where the primary key in one table and the foreign key in another table are the same 

One-to-Many Relationship - between two tables where the primary key in one table can be duplicated many times in another table

35/62

Introduction to and Using MS Access – Managing Data

9. Managing Data

Add Records to a Table

Find and replace

36/62

9. Managing Data

Totals - to add a totals row to your database

Introduction to and Using MS Access – Managing Data

37/62

9. Managing Data

Sort Records - sort records in a datasheet by a single column or by two adjacent columns

Introduction to and Using MS Access – Managing Data

38/62

9. Managing Data

Filter - to include only records that you want to display

Introduction to and Using MS Access – Managing Data

39/62

10. Querying a Database

Query Wizard - to set up a query

Introduction to and Using MS Access – Querying Database

40/62

10. Querying a Database

Query Wizard - to set up a query

Introduction to and Using MS Access – Querying Database

41/62

10. Querying a Database

Query Wizard - To switch between tables and queries

Introduction to and Using MS Access – Querying Database

42/62

10. Querying a Database

Query Design Feature - design a query with the  Query Design Button

Introduction to and Using MS Access – Querying Database

43/62

10. Querying a Database

Query Design Feature - design a query with the  Query Design Button

Introduction to and Using MS Access – Querying Database

44/62

10. Querying a Database

Query Design Feature - run

Introduction to and Using MS Access – Querying Database

45/62

11. Calculated Fields

Expressions - combination of functions, field names, numbers, text, and the operators listed above

Introduction to and Using MS Access – Calculated Fields

46/62

11. Calculated Fields

Expressions - builder

Introduction to and Using MS Access – Calculated Fields

Zoom - to view an entire expression

47/62

12. Designing Forms

Create a Form - create a form from a table or a query

Introduction to and Using MS Access – Designing Forms

48/62

12. Designing Forms

Create a Form - To change the colors and fonts

Introduction to and Using MS Access – Designing Forms

Preview the Form

49/62

12. Designing Forms

Form Wizard - create forms with the help of the Form Wizard

Introduction to and Using MS Access – Designing Forms

Form Wizard - choose the field

50/62

12. Designing Forms

Form Wizard - choose the layout

Introduction to and Using MS Access – Designing Forms

Form Wizard - choose the style

51/62

12. Designing Forms

Form Wizard – create a title

Introduction to and Using MS Access – Designing Forms

Form Wizard - result

52/62

13. Generating Reports

Create a report

Introduction to and Using MS Access – Generating Reports

Create a report - add existing fields

53/62

13. Generating Reports

Report Wizard - create a report using the report wizard

Introduction to and Using MS Access – Generating Reports

Report Wizard – choose the fields

54/62

13. Generating Reports

Report Wizard - Choose the sort order

Introduction to and Using MS Access – Generating Reports

Report Wizard - Chose the layout

55/62

13. Generating Reports

Report Wizard - Choose a style

Introduction to and Using MS Access – Generating Reports

Report Wizard - Create a title

56/62

13. Generating Reports

Report Wizard - output

Introduction to and Using MS Access – Generating Reports

57/62

14.Visual Basic

To create a more complex database, you would have to write codeMicrosoft Access ships with a programming environment named Microsoft Visual Basic

Introduction to and Using MS Access –Visual Basic

To access Visual Basic

58/62

14.Visual Basic

Introduction to and Using MS Access –Visual Basic

Project Explorer - displays the coding objects available for your database

Visual Basic Child Windows 

Properties - every object and item of your database has characteristics

59/62

14.Visual Basic

Introduction to and Using MS Access –Visual Basic

Code Editor - the area where you will mostly be working  

Combo Box - to select a particular object and access its events, actions that the object can launch

60/62

14.Visual Basic

Introduction to and Using MS Access –Visual Basic

Code Editor  

61/62

14.Visual Basic

Introduction to and Using MS Access –Visual Basic

Immediate view - The Immediate window is used to test code when necessary.

62/62

Thank You!!

Recommended