You are on page 1of 25

DATABASE MANAGEMENT

SYSTEM (DMS)
 This is an application that helps you
maintain your records.
 Examples in the group are: -
a) Ms access.
b) D-base.
c) Lotus approach.
d) FoxPro.
e) Paradox etc
 Database is a collection of data and objects
related to a particular topic or purpose.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 1


MS ACCESS
OBJECTS/STRUCTURES.
1. Table
2. Queries
3. Report
4. Form
5. Macro

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 2


A. A table is a collection of data about a
specific topic, such as products or suppliers.
Using a separate table for each topic means
that you store that data only once, which
makes your database more efficient, and
reduces data-entry errors. Tables organize
data into columns (called fields) and rows
(called records).
B. Queries are objects used to view, change,
and analyze data in different ways. You can
also use them as the source of records for
forms and reports.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 3


C. Report is an effective way to present your
data in a printed format. Because you have
control over the size and appearance of
everything on a report, you can display the
information the way you want to see it.
D. Form is a Microsoft access object on which
you place controls for taking actions or for
entering, displaying and editing data in fields.
E. Macro is a set of one or more actions that
each performs a particular operation, such as
opening a form or printing a report. Macros
can help you to automate common tasks.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 4


CREATING A NEW
DATABASE
 When Microsoft Access first starts up, a
dialog box is automatically displayed with
options to create a new database or open an
existing one. If this dialog box is displayed,
click blank access Database, and then
click OK.
 Specify the name and location for the
database. Click Create to start defining
your new database.
Saturday, August 28, 2 BEACONS INFOTECH Ms Access 5
OPENING AN EXISTING
DATABASE.
 When Microsoft Access first starts up,
a dialog box is automatically
displayed with options to create a new
database or open an existing one.
 If this dialog box is displayed, click
open an existing access Database,
specify the name and then click OK.
Saturday, August 28, 2 BEACONS INFOTECH Ms Access 6
CREATING A NEW TABLE
USING DESIGN VIEW
 Click Tables under Objects, and then click New on
the Database window toolbar.
 Click Design View and then click Ok. Define each of
the fields in your table.
 Define a primary key field before saving your table.
 Note: - You don't have to define a primary key, but
it's usually a good idea. If you don't define a primary
key, Microsoft Access asks if you want it to create
one for you when you save the table by clicking Yes.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 7


 Click Save on the toolbar, and then type the name
for the table. Finally you click OK.
OPENING A TABLE
 In the Database window, click Tables under
Objects. Click the name of the table you want to
open.
 To open the table in Design view, click Design
and to open the table in Datasheet view, click
Open on the Database window toolbar.
 NB: - After you've opened a table, you can easily
switch between the two views by clicking the
View button on the toolbar

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 8


PRIMARY KEYS.
 They are unique characters that are
inserted in a table, for record identity.
 They also help in creating of table’s
relationships establishment.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 9


QUERIES.
Creating A Select Query.
 Click query under Objects, and then click New on
the Database window toolbar.
 Click Design View and then click Ok. Insert by
selecting and clicking add the tables or queries
that include the records you want in your query.
 Drag from the field list to the query design grid
the fields you want in your query and specify the
criteria if necessary.
 Click Run on query menu to create your select
query.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 10


What Is an Action Query and
When Would You Use One?
• An action query is a query that makes
changes to many records in just one
operation.
• Types of action queries:
I. Delete queries.
II. Update queries.
III. Append queries.
IV. Make-table queries.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 11


Creating an Update Query.
 Click query under Objects, and then click
New on the Database window toolbar.
 Click Design View and then click Ok.
Insert by selecting and clicking add the
tables or queries that include the records
you want to update and the fields you want
to use for setting criteria.
 In the menu bar click query menu click
Update Query. Drag from the field list to
the query design grid the fields you want to
update or you want to specify criteria for.
Saturday, August 28, 2 BEACONS INFOTECH Ms Access 12
 In the Criteria cell, specify the criteria if
necessary.
 In the Update To cell for the fields you
want to update, type the expression or
value you want to use to change the fields.
 Click Run on query menu to update the
records.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 13


Creating an Append Query
 Click query under Objects, and then click New on
the Database window toolbar.
 Click Design View and then click Ok. Insert by
selecting and clicking add the tables or queries
that include the records you want to append and
any fields you want to use for setting criteria.
 In the menu bar click query menu click Append
Query. The Append dialog box appears. In the
Table Name box, enter the name of the table you
want to append records to.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 14


 Click Current Database if the table is in the
currently open database. Or click Another
Database and type the name of the database
where the table is stored. Click OK.
 Drag from the field list to the query design grid
the fields you want to append and any fields you
want to use for setting criteria.
 If the fields you've selected have the same name
in both tables, Microsoft Access automatically
fills the matching name in the Append To row. If
the fields in the two tables don't have the same
name, in the Append To row, enter the names of
the fields in the table you're appending to.
 Click Run on query menu to add the records in
the table.
Saturday, August 28, 2 BEACONS INFOTECH Ms Access 15
Creating a Make-table Query
 Click query under Objects, and then click
New on the Database window toolbar.
 Click Design View and then click Ok.
Insert by selecting and clicking add the
tables or queries that include the records
you want to put in the new table.
 In the menu bar click query menu click
make-table Query.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 16


 The Make Table dialog box appears.
In the Table Name box, enter the
name of the table you want to create.
Click OK.
 Drag from the field list to the query
design grid the fields you want in the
new table.
 Click Run on query menu to create
the new table.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 17


Creating a Delete Query.
 Click query under Objects, and then click New on
the Database window toolbar.
 Click Design View and then click Ok. Insert by
selecting and clicking add the tables or queries
that include the records you want to delete.
 In the menu bar click query menu click delete
Query.
 Drag to the design grid the fields on which you
want to set criteria of deleting the records.
 Click Run on query menu to delete the records.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 18


CREATING A FORM USING
FORM WIZARD
 In the Database window, click Forms under
Objects. Click the New button on the Database
window toolbar.
 In the New Form dialog box, click form wizard.
Select the table or other record source that includes
the data you want to base your form on. Click OK.
 Follow the directions in the wizard dialog boxes by
clicking next to continue till you reach the end,
that you click, finish.
 If the resulting form doesn't look the way you
want, you can change it in Design view.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 19


CREATING A REPORT
USING REPORT WIZARD
 In the Database window, click Reports under
Objects. Click the New button on the Database
window toolbar.
 In the New Report dialog box, click report
wizard. Select the table or query that contains the
data you want to base your report on. Click OK.
 Note   Microsoft Access uses this table or query
as the default record source for the report.
However, you can change the record source in the
wizard and select fields from other tables and
queries.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 20


 Follow the directions in the wizard dialog boxes
by clicking next to continue till you reach the
end, that you click, finish.
 If the resulting report doesn't look the way you
want, you can change it in Design view.
 Opening a report
 In the Database window, click Reports under
Objects. Click the report you want to open. On
the Database window toolbar, click the Design
button to open the report in Design view, or click
the Preview button to open the report in Print
Preview.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 21


CREATING A MACRO
 In the Database window, click Macros under
Objects. Click the New button on the Database
window toolbar.
 In the Action column, click in the first cell and
then click the arrow to display the action list.
Click the action you want to use.
 In the lower part of the window, specify
arguments for the action, if any are required.
 To add more actions to the macro, move to
another action row, and repeat previous steps.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 22


RELATIONSHIPS
 Is and association established between common
fields (columns) in two tables.
 They are: -
a. One-to-one Relationship is created if only one
of the related fields is a primary key.
b. One-to-many Relationship is created if both of
the related fields are primary keys.
c. Many-to-many Relationship is really two one-
to-many relationships with the third table whose
primary key consists of two fields.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 23


DEFINING/CREATING
RELATIONSHIPS.
 Close any tables you have open. You can't create
or modify relationships between open tables.
 Click Relationships from tools menu in the
menu bar. If your database doesn't have any
relationships defined, the Show Table dialog box
will automatically be displayed.
 If you want to add a table to relate and the Show
Table dialog box isn't displayed, click Show
Table from tools menu in the menu bar. Double-
click the names of the tables you want to relate,
and then close the Show Table dialog box.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 24


 Drag the field that you want to relate from one
table to the related field in the other table.
 The Edit Relationships dialog box is displayed.
Check the field names displayed in the two
columns to ensure they are correct. You can
change them if necessary.
 Click the Create button to create the relationship.
 When you close the Relationships window,
Microsoft Access asks if you want to save the
layout. Whether you save the layout or not, the
relationships you create are saved in the database.

Saturday, August 28, 2 BEACONS INFOTECH Ms Access 25

You might also like