Download Document

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Microsoft Access wikipedia , lookup

SQL wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Ingres (database) wikipedia , lookup

Database wikipedia , lookup

Entity–attribute–value model wikipedia , lookup

Functional Database Model wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

Versant Object Database wikipedia , lookup

Clusterpoint wikipedia , lookup

Extensible Storage Engine wikipedia , lookup

Relational model wikipedia , lookup

Database model wikipedia , lookup

Transcript
By:
Nour Hilal
1
• 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
2
3
• 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.
4
Create blank desktop database
5
• 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.
6
Solve Activity 1.1.1
• 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.
7
1
2
3
4
8
– 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.
9
Solve Activity 1.1.2
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.
10
Table Name
Records
New Record
Navigation bar
11
Table Name
Fields
Data Type for
each field
Field
Properties
12
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.
13
Solve Activity 2.1.4
14
15
Solve Activity 2.1.2
• 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
16
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”)
17
Solve Activity 2.2.4
To enter data in the table:
• Open the table in Datasheet view.
• Type the data in the fields.
18
19
Solve Activity 1.2.4
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.
20
• 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.
21
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)
22
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.
23
• 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.
24
A 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.
25
The 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.
26
• 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.
27
Solve Activity 2.3.2
There are several ways to run a query
1st Method - Click Run in Design view
2nd Method - Double-click on the Query name in
the Navigation Pane
28
• 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.
29
30