1 by: nour hilal. microsoft access is a database software where data is stored in one or more...

Post on 01-Jan-2016

216 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

1

By: Nour Hilal

MICROSOFT ACCESS 2013

2

ACCESS

• Microsoft Access is a database software where data is stored in one or more Tables.

• A Database is a group of related Tables.

• Access Database file extension is .accdb

3

ACCESS WINDOW PARTS

4

DATABASE OBJECTS• Access Database has different objects

that are used to Store, Manipulate and Retrieve Data from the Database.

• Commonly used objects are:1. Table. 2. Form.3. Query.

5

CREATING A DATABASE

Create blank desktop database

6

CREATING A BLANK DATABASE

• To create a Blank desktop database, click on the File tab: Click on New. Click Blank desktop database. Enter a file name in the textbox and

navigate to the appropriate folder to save the database.

Click OK. Click Create.

7

OPEN AN EXISTING DATABASE

• To open an existing database click on the File tab: Click on Open. Click Computer. Click Browse, and select your

database, then click Open. Click enable content in the security

warning bar, under the ribbon.

Solve Activity 1.1.1

8

1 2

3 4

9

TABLES

– A Table is a collection of records about an entity (a person, place, or thing). (Eg. Student, Product, Patient, etc)

– The Table in Access consists of Rows and Columns.– Every Column is referred to as a Field and

every Row is referred to as a Record.– A Record is a group of related fields. – A Field is a specific item in a Table, defined by

a Data Type. (Eg. Name, nationality, Tel Num, etc..)

– A Table is the basic element in any Database.

10

TABLE VIEWS

There are two different ways to view a table. • Datasheet View - looks like a grid

that contain fields and records. In the Datasheet view, you can view, add, edit and delete records.

• Design View - is a detailed view of the table’s structure. The Design View is used to create, modify and delete fields.

Solve Activity 1.1.2

11

DATASHEET VIEW

Table Name

Navigation bar

Records

New Record

12

DESIGN VIEW

Fields

Field Properties

Table Name

Data Type for each field

13

CREATING TABLES

Tables can be created by:– Open Create tab.– Press on Table Design.– In Table Design View window, insert

fields’ names and data types.– Save the table.

14

CREATING A TABLE IN DESIGN VIEWSolve Activity 2.1.4

15

DATA TYPES

16

PRIMARY KEY• Primary key is the field that uniquely identifies each record in a

table. • Setting a field as a primary key will not allow any empty or

replicated values in that field.• How to set a primary key?: Select the requested field, then press

on primary key button in Design tab.

Primary key button

Solve Activity 2.1.2

17

FIELD PROPERTIES The field’s Data Type determines the type of data that can be entered and the operations that can be performed on that data, and its Field Properties determine how the field looks and behaves. 1. Field Size: Determines the maximum number of characters of a

text field, or the format of a number field.2. Caption: Enables an alternate name to be displayed other than

the field name; alternate names appears in datasheets, forms and reports .

3. Default Value: Automatically displays a specified value for a field, in a new record. (E.g. Nationality as “SAUDI”)

18

INSERTING RECORDS

To enter data in the table:• Open the table in Datasheet view.• Type the data in the fields.

Solve Activity 2.2.4

19

NAVIGATION THROUGH RECORDS

20

SORT

Using sort will list the records in a specific sequence. • Ascending sorts text data in alphabetical order or

numbers from lowest to highest. • Descending sorts text data in reverse alphabetical order

or numbers from highest to lowest.

Solve Activity 1.2.4

21

QUERIES

• A Query lets you to set up criteria (search condition) and retrieve specific data from the Table.

• It is like a question that you ask about the data. For example, how many students got an A grade? The answer is shown in the query results. It can be used to display only records that meet certain conditions and only for certain fields.

22

CREATING A SINGLE-TABLE QUERY

To create a query:• Open Create tab.• Press on Query Design.• Select the desired table from the table

window , press Add then Close.• In the query design view, double click the

desired fields to be added in the query design grid (you will see the fields being added on the bottom half of the window)

23

QUERY DESIGN VIEW The Query Design view is used to create queries. The Query Design view is divided into two parts:•The top portion displays the tables.•The bottom portion (query design grid) displays the fields and the criteria.

24

PARTS OF QUERY DESIGN GRID• Field Row - displays the field name.• Table Row - displays the data

source.• Sort Row - enables you to sort in

ascending or descending order.• Show Row - controls whether the

field will be displayed in the query results.

• Criteria Row - is used to set the rules that determine which records will be selected.

25

COMPARISON OPERATORSA comparison operator such as equal (=), not equal (<>), greater than (>), less than (<), greater than or equal to (>=), and less than or equal to(<=) can be used in the criteria of a query. Comparison operators enable you to limit the query results to only those records that meet the criteria.

26

AND, OR, AND NOT CRITERIAThe logical operators are used when questions are more specific and require queries with multiple criteria.• When the criteria are in the same row of the query design grid, Access interprets the

instructions using the AND operator. This means that the query results will display on the records that match all criteria.

• When you have multiple sets of criteria and you need to satisfy one set only, use the OR criterion. The query results will display records that match any of the specified criteria.

• The NOT logical operator returns all records except the specified criteria.

27

QUERY DATASHEET VIEW

• Use Design view to specify the criteria; your results will be displayed in Datasheet view.

• The results of the query are shown in Datasheet view, as seen in the bottom image.

28

RUNNING A QUERY

There are several ways to run a query1st Method - Click Run in Design view2nd Method - Double-click on the Query name in the Navigation Pane

Solve Activity 2.3.2

29

FORMS

• A Form lets you display, enter and edit data, one record at a time.

• Three main reasons to use a form:1. Less likely to edit the wrong record by

mistake.2. Data can be shown from multiple

tables simultaneously.3. Access can create forms to match

paper forms.

30

top related