T H E B A S I C S
Microsoft Access
1
Overview of Access
A database contains objects that store, edit, and format information.
Data is organized in a database in the form of tables.
Two common types of databases Flat file and Relational.
•Flat file: database contains all the data in a single table,
•Relational: database stores data in multiple tables.
Microsoft Access is a powerful
program to create and manage
your databases. It has many
built in features to assist you in
constructing and viewing your
information.
2
Why use MS Access
• Easy to use
• GUI, Looks good
• Stand-alone
• Do not require any other program to run or use
• Lots of support
• Help File, Message boards
• Relatively cheap
• Comes with MS Office Suite
• Integration
• Can be integrated with other MS Office applications
3
Limitations
 It’s a Microsoft product
 Bugs galore
 Overly user- friendly
 Tried too hard to predict what you what to do
 Not suited for large databases
 Takes up lots of computer resources
 Expensive
 Must buy from Microsoft. Not open source
 Complicated to use for connectivity to other
types of databases
4
Basics of Access
 The key window in Access is known as
the ‘database window’.
 Seven objects can be launched from this window:
 Tables
 Queries
 Forms
 Reports
 Pages
 Macros
 Modules
 These objects, in turn, become their own windows.
5
Basics of Access
 The smallest piece of information in a database is
called a field
 customer name
 A group of related fields is called a record
 customer name, address, phone number
 A table is a collection of records about a particular
subject
 customers
 A relational database consists of a set of related
tables
 Customers and Orders and Products
6
Basics of Access
 Primary Key
 A field used to uniquely identify each record
 Every table in a database must have a primary key defined
 Composite Key
 More than one field used in combination to uniquely identify
each record
 Foreign Key
 A field (in one table) that is related to a primary key in
another table within the same database.
7
Basics of Access
 Queries
 A subset of table information
 Similar to filter or find operation within table
 searches for records according to specified criteria and displays
these records
 Also like a sort operation
 can change the order of records
 Differs from filter and sort in that a query can be run
against several tables
8
Basics of Access
 Forms
 Used to easily view, enter, and change data directly in a
table
 retrieves the data from one or more tables, and displays
it on the screen
 also display pictures and other objects
 can contain a button that prints, opens other objects, or
otherwise automates tasks
 Reports
 Used to analyze your data or present it a certain way
 a method to present your data in a printed format, such
as charts & invoices
9
 click the Start button, and then click All Programs
 click Microsoft Office, and then click Microsoft Office Access 2007
Create a Database
10
Create a Database (cont.)
Click Blank Database. Type a name for your database in the File Name Box.
11
Create a Database
To create fields for the table, double click the Add New
Field cell, type First Name and press the ENTER key.
Create a Database (cont.)
12
Create a Database (cont.)
To add data to the table, type in the data in each field cell.
13
Create a Database (cont.)
Entering Data
14
Design View
Design view:
A view that shows the
design of these database
objects: tables, queries,
forms, reports, and
macros. In Design view,
you can create new
database objects and
modify the design of
existing objects.
15
Create a table in Design view
 Design view allows you to build a table from
scratch and set or change every available property for
each field.
 You can also open existing tables in Design view and
add, remove, or change fields.
16
Setting a Primary Key
17
The Primary Key is the unique identifier for each record in
a table. Access will not allow duplicate entries in a Primary
Key field. By default, Access sets the first field in the table
as the Primary Key field.
To Set a Primary Key:
1) Switch to Design View
2) Position your cursor in the field you wish to set as the
Primary Key
3) Click the Primary Key button on the Ribbon
Creating Forms
To create a form from a table, click on the Form icon from
the Create tab.
18
Creating Forms (cont.)
Entering Data
19
Database Queries
 You use a query to retrieve specific information
from a database.
 A query is a question that you enter in a database
program.
 The database program then performs the required
operations to present the answer in the form of a
report.
 A query helps you view specific data to modify or
analyze it.
20
Creating Queries
To create a query, click the Create tab. In the Ribbon,
click Query Wizard.
21
Creating Queries (cont.)
When the New Query window appears, make sure Simple
Query Wizard is selected.
Transfer data from the Available Field to the Selected Field
one at a time using >
22
Creating Queries (cont.)
When the final screen appears, type the Names of the query
23
Creating Queries (cont.)
.
The query is automatically saved and executed.
24
Creating Queries (cont.)
25
Creating Queries (cont.)
26
Creating Queries (cont.)
27
Working with Reports
To create a report by using the Report Wizard, click the
Create tab, and in the Reports group, click Report
Wizard.
28
Working with Reports
29
Establishing Relationships
30
 Click the Database tools and click the Relationships
icon
 In the Relationship window, click and drag a field
name from one table to a field name in a related
table
Relationships icon
Click and drag to create a relationship
Establishing Relationships
31
 Enter the appropriate settings in the Edit relationships
dialog box and click Create
 A join line will appear when one table is joined to
another
Infinity symbol notes referential integrity
has been appliedSet referential integrity and cascades
32

Access Basics 01

  • 1.
    T H EB A S I C S Microsoft Access 1
  • 2.
    Overview of Access Adatabase contains objects that store, edit, and format information. Data is organized in a database in the form of tables. Two common types of databases Flat file and Relational. •Flat file: database contains all the data in a single table, •Relational: database stores data in multiple tables. Microsoft Access is a powerful program to create and manage your databases. It has many built in features to assist you in constructing and viewing your information. 2
  • 3.
    Why use MSAccess • Easy to use • GUI, Looks good • Stand-alone • Do not require any other program to run or use • Lots of support • Help File, Message boards • Relatively cheap • Comes with MS Office Suite • Integration • Can be integrated with other MS Office applications 3
  • 4.
    Limitations  It’s aMicrosoft product  Bugs galore  Overly user- friendly  Tried too hard to predict what you what to do  Not suited for large databases  Takes up lots of computer resources  Expensive  Must buy from Microsoft. Not open source  Complicated to use for connectivity to other types of databases 4
  • 5.
    Basics of Access The key window in Access is known as the ‘database window’.  Seven objects can be launched from this window:  Tables  Queries  Forms  Reports  Pages  Macros  Modules  These objects, in turn, become their own windows. 5
  • 6.
    Basics of Access The smallest piece of information in a database is called a field  customer name  A group of related fields is called a record  customer name, address, phone number  A table is a collection of records about a particular subject  customers  A relational database consists of a set of related tables  Customers and Orders and Products 6
  • 7.
    Basics of Access Primary Key  A field used to uniquely identify each record  Every table in a database must have a primary key defined  Composite Key  More than one field used in combination to uniquely identify each record  Foreign Key  A field (in one table) that is related to a primary key in another table within the same database. 7
  • 8.
    Basics of Access Queries  A subset of table information  Similar to filter or find operation within table  searches for records according to specified criteria and displays these records  Also like a sort operation  can change the order of records  Differs from filter and sort in that a query can be run against several tables 8
  • 9.
    Basics of Access Forms  Used to easily view, enter, and change data directly in a table  retrieves the data from one or more tables, and displays it on the screen  also display pictures and other objects  can contain a button that prints, opens other objects, or otherwise automates tasks  Reports  Used to analyze your data or present it a certain way  a method to present your data in a printed format, such as charts & invoices 9
  • 10.
     click theStart button, and then click All Programs  click Microsoft Office, and then click Microsoft Office Access 2007 Create a Database 10
  • 11.
    Create a Database(cont.) Click Blank Database. Type a name for your database in the File Name Box. 11
  • 12.
    Create a Database Tocreate fields for the table, double click the Add New Field cell, type First Name and press the ENTER key. Create a Database (cont.) 12
  • 13.
    Create a Database(cont.) To add data to the table, type in the data in each field cell. 13
  • 14.
    Create a Database(cont.) Entering Data 14
  • 15.
    Design View Design view: Aview that shows the design of these database objects: tables, queries, forms, reports, and macros. In Design view, you can create new database objects and modify the design of existing objects. 15
  • 16.
    Create a tablein Design view  Design view allows you to build a table from scratch and set or change every available property for each field.  You can also open existing tables in Design view and add, remove, or change fields. 16
  • 17.
    Setting a PrimaryKey 17 The Primary Key is the unique identifier for each record in a table. Access will not allow duplicate entries in a Primary Key field. By default, Access sets the first field in the table as the Primary Key field. To Set a Primary Key: 1) Switch to Design View 2) Position your cursor in the field you wish to set as the Primary Key 3) Click the Primary Key button on the Ribbon
  • 18.
    Creating Forms To createa form from a table, click on the Form icon from the Create tab. 18
  • 19.
  • 20.
    Database Queries  Youuse a query to retrieve specific information from a database.  A query is a question that you enter in a database program.  The database program then performs the required operations to present the answer in the form of a report.  A query helps you view specific data to modify or analyze it. 20
  • 21.
    Creating Queries To createa query, click the Create tab. In the Ribbon, click Query Wizard. 21
  • 22.
    Creating Queries (cont.) Whenthe New Query window appears, make sure Simple Query Wizard is selected. Transfer data from the Available Field to the Selected Field one at a time using > 22
  • 23.
    Creating Queries (cont.) Whenthe final screen appears, type the Names of the query 23
  • 24.
    Creating Queries (cont.) . Thequery is automatically saved and executed. 24
  • 25.
  • 26.
  • 27.
  • 28.
    Working with Reports Tocreate a report by using the Report Wizard, click the Create tab, and in the Reports group, click Report Wizard. 28
  • 29.
  • 30.
    Establishing Relationships 30  Clickthe Database tools and click the Relationships icon  In the Relationship window, click and drag a field name from one table to a field name in a related table Relationships icon Click and drag to create a relationship
  • 31.
    Establishing Relationships 31  Enterthe appropriate settings in the Edit relationships dialog box and click Create  A join line will appear when one table is joined to another Infinity symbol notes referential integrity has been appliedSet referential integrity and cascades
  • 32.